Nothing
#' 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: :, , , `<br />`. 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: :, , , `<br />`. 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(": ", " ", " ", "<br />", 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(': ', ' ', ' ', '<br />')")
} else {
if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "<br />": "<br />"}')) > 1) {
named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "<br />": "<br />"}')
# Get the names of the list
names_list <- names(named_list)
# Convert names to boolean values only if they are "true" or "false"
boolean_names <- sapply(names_list, function(x) {
if (x == "true") {
return("TRUE")
} else if (x == "false") {
return("FALSE")
} else {
return(x) # Return the original name if it's not "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(": ", " ", " ", "<br />", 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(': ', ' ', ' ', '<br />')")
} else {
if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "<br />": "<br />"}')) > 1) {
named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "<br />": "<br />"}')
# Get the names of the list
names_list <- names(named_list)
# Convert names to boolean values only if they are "true" or "false"
boolean_names <- sapply(names_list, function(x) {
if (x == "true") {
return("TRUE")
} else if (x == "false") {
return("FALSE")
} else {
return(x) # Return the original name if it's not "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)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.