Comments

1 comment

  • Avatar
    Adi Lewenstein

    Hi Vikas,

    This kind of display is not native to Blox, due to the fact that each card represents only a single row from the query's result set.

    We can work around this limitation with Javascript though.

    In the dashboard available here (based on the sample E-commerce elasticube), I've added a BloX widget that contains a single text block, to which I gave an id blox-dates-title.

    Once finished and applied, I added a widget script that runs once the widget is ready. The script looks through the query results and gets the earliest and latest dates available in the data. It then injects the range into the text block of the appropriate id.

    This example relies on the dataset providing the right dates. Getting the same directly from the filters would be more complicated, due to the many date levels, filter types, and formatting permutations.

    The reason I used a widget script rather than adding the script inside the JSON was that I wanted to use the widget's events and attribtues, and they are easier to access from the widget script.

    You can use this example and tailor the script to your specific requirements.

    If you require more assistance adjusting the script, please contact our support team or your customer success manager.

    2
    Comment actions Permalink

Please sign in to leave a comment.