For AI agents: the complete documentation index is available at https://docs.dataplatform.ovh.net/llms.txt, the full documentation bundle is available at https://docs.dataplatform.ovh.net/llms-full.txt, and this page is available as Markdown at https://docs.dataplatform.ovh.net/sdk/app-dynamic_parameters.md.
  • 🇬🇧 English
  • Dynamic Parameters

    Warning

    Rework pending, no delivery date. The Front App SDK (ReactJS) and the Front API SDK (NodeJS) are both being replaced. This page documents the current release, remains accurate, and is maintained until the replacement ships. Code written against it keeps working.

    Dynamic parameters enables your end-users to select values which are passed on to Charts to be filtered on and refreshed.

    Dynamic Parameters values are applied to Chart requests at the Front API level via Analytics Manager Transformers. You may extend default Transformers to your own needs.

    For specific display needs, it is also possible to create custom Dynamic Parameters.


    List of available Dynamic Parameters

    namedescription
    selectboxSelect from a list, one or more items
    checkboxSelect from checkboxes one or more items
    radioSelects an item through a list of radio buttons
    datepickerSelect a date range
    datepicker.daySelect a specific day
    datepicker.monthsSelect a month range
    datepicker.monthSelect a specific month
    toggleReturn a boolean

    Configuration

    {
      "id": "my-id",
      "component": "selectbox",
      "type": "filter"
    }
    fieldsdescription
    idUsed when saving its state and to connect it to Charts.
    componentSpecify the dynamic parameter to use, either those listed above, or your own.
    typeSpecify how requests are affected, acting either as a filter or as a scale. Custom transformers may handle your own types
    Warning

    Tip When using Architect it will auto-generate an id with a non-meaningful name. We strongly recommend to rename it as soon as you have created it, as this id will be used in chart.dynamic-parameters.


    Adding Dynamic Parameters in Dashboard

    You can add a dynamic parameter :

    • from the online dashboard editor and its dialog boxes
    • in Advanced Mode to edit JSON configuration
    • by editing directly configuration files in ./config/
    • Via the menu tab in the main menu selection

    Using a Dynamic Parameter in another React Component

    You may use a dynamic parameter directly from code. Use the same JSON configuration as described above, and then call it as any React component.

    Example:

    import React from 'react'
    import FpDynamicParameter from 'forepaas/dynamic-parameter'
    
    const myDynP =  {
        id: 'city',
        type: 'filter',
        component: 'checkbox',
        reference: 'city',
        dictionary: 'city',
        default: ['Paris', 'San Francisco']
    }
    class MyComponent extends React.Component {
        render () {
            return (
                <div className='hello-world'>
                    <FpDynamicParameter dynamic-parameter={myDynP} />
                </div>
            )
        }
    }
    export default MyComponent

    Creating your own Dynamic Parameter

    You can write your own component to customize the appearance of your dynamic parameter.

    ?>➡️ Check out the available tutorial here!