Filter bar not working in canvas

I am creating a canvas and I want a Time Filter bar to select a specific date and all my elements from the canvas to adapt to that new time range.
How can I do that? I have just added a filter bar in my canvas where are the rest of elements and when I select an specific date nothing happens.

Thank you in advance

Most Canvas expressions start with filters | ... for this reason. You can also group filters by assigning them a group ID, and then use filters groupName="name" | to have different filters for different elements.

Yes, I know that you can do that if you work with queries, but if you are using a savedvisualization, there is a mandatory field that says timerange that if you put a filter before it, i think it overrides the value.

savedVisualization id="45ce8f50-240a-11eb-b321-2d4230c55aff" timerange={timerange from="now-2d" to="now"}
| render

Then, how do I have to do it to apply a filterBar group to those savedVisualizations and make it work with that instad of the timerange?

Thank you very much

I asked the Canvas team about this. You are required to provide a timerange to the savedVisualization, but the filters are also including a time range. These time ranges will get applied together using AND, so you can intersect the time ranges.

Mmmm sounds good but I still don't see the way to implement it working.
Would be so nice if you could make a small tutorial on how to combine filter bars and saveobjects since there are not on the internet.

Thanks again!

It's just filters | savedVisualization timerange={...}

Nop, not working, my code is the following:

| filters mygroup
| savedVisualization id="45ce8f50-240a-11eb-b32-2d4230c55aff" timerange={timerange from="now-2d" to="now"}
| render

I think first applies the filtergroup from the time filter bar but then it is overwrited by the timerange property which can't be deleted.

Thanks and sorry for bothering.

As long as the column is set correctly on your time range, this will work. For example:

timefilterControl compact=true column="order_date" filterGroup="mygroup"
| render
filters "mygroup"
| savedVisualization id="4b3ec120-b892-11e8-a6d9-e546fe2bba5f" timerange={timerange from="now-7d" to="now"}
| render

This works as expected.

Works with @timestamp ? Because the x-axis of my Visualization is based on that and I have the same as you but: column="@timestamp" which makes sense for me, but still not getting the expected result.

If you change your time range in your filter, the results of the visualization should change- for example, you can choose non-overlapping time ranges and see no results. This is the easiest way to verify.