Skip to content

Inputs

You can specify input elements within the settings and tracks sections, allowing users to parameterize and customize their visualization. Galaxy Charts currently supports the following input types: boolean, color, data, float, integer, select, and text.

Below is a template for a generic input element. It includes attributes such as label, help, name, and type, along with an optional data array used for select inputs:

xml
<input>
    <label>My Input Label</label>
    <help>My Input Help</help>
    <name>my_input_name</name>
    <type>boolean | color | float | integer | select | text</type>
    <data>
        <data>
            <label>My Option 1 Label</label>
            <value>my_option_1</value>
        </data>
        ...
    </data>
</input>

Boolean Input

Boolean inputs are useful to display yes/no options to the user e.g.

xml
<input>
    <label>My Boolean Label</label>
    <help>My Boolean Help</help>
    <name>my_boolean_name</name>
    <type>boolean</type>
</input>

Translates to:

my_boolean_name = true

Color Input

Users may also select colors, this can be particular useful to distinguish data tracks e.g. in bar or line diagrams:

xml
<input>
    <label>My Color Label</label>
    <help>My Color Help</help>
    <name>my_color_name</name>
    <type>color</type>
</input>

Translates to:

my_color_name = #0284c7

Data Input

Using a data input field you can allow users to select a dataset from Galaxy:

xml
<input>
    <label>My Data Label</label>
    <help>My Data Help</help>
    <name>my_data_name</name>
    <type>data</type>
</input>

Translates to:

my_data_name = dataset_id_a

Float Input

xml
<input>
    <label>My Float Label</label>
    <help>My Float Help</help>
    <name>my_float_name</name>
    <type>float</type>
    <min>0</min>
    <max>100</max>
</input>

Translates to:

my_float_name = 1

Integer Input

xml
<input>
    <label>My Integer Label</label>
    <help>My Integer Help</help>
    <name>my_integer_name</name>
    <type>integer</type>
    <min>0</min>
    <max>100</max>
</input>

Select Input

xml
<input>
    <label>My Select Label</label>
    <help>My Select Help</help>
    <name>my_select_name</name>
    <type>select</type>
    <value>my_option_a</value>
    <data>
        <data>
            <label>My Option A Label</label>
            <value>my_option_a</value>
        </data>
        <data>
            <label>My Option B Label</label>
            <value>my_option_b</value>
        </data>
        ...
    </data>
</input>

Translates to:

my_select_name = my_option_a

Text Input

Last but not least, text inputs can be declared.

xml
<input>
    <label>My Text Label</label>
    <help>My Text Help</help>
    <name>my_text_name</name>
    <type>text</type>
</input>

Translates to:

my_text_name = My Text