September 16, 2024
Retool introduced a new Timeline component, a time-based visualization tool for displaying tasks or activities in a Gantt-like chart. This feature is useful for adding a new level of visual clarity to your Retool applications, especially when dealing with tasks that span over time.
The Timeline component allows you to create bars that represent different activities or tasks. Each bar comes with labels, so it's easy to identify tasks at a glance. You can also color-code these bars to make the chart visually appealing and organized.
Here are a few things to love about this new addition:
The Timeline component can be useful in several scenarios. Here are a few ideas:
Data-Driven: As with all Retool components, the Timeline is powered by your data sources. Simply map the relevant properties to display events as desired.
Easy configuration: It’s minimalistic yet fully functional out of the box, making it extremely easy to set up. All you need to do is connect your data and adjust a few settings.
Interactive scrolling: The component allows users to pan the viewport, scrolling both horizontally and vertically to explore different events. This provides a flexible and interactive user experience.
Deadline markers: You can add markers to highlight deadlines or important milestones, adding more context to the timeline.
Since the component is data-driven, any changes to the data source will automatically update the representation, ensuring real-time adaptability. This approach provides flexibility, allowing for the seamless integration of additional controllers or interfaces when interaction or customization is required. As the underlying data evolves, so does the system’s ability to reflect those changes dynamically.
Here you can see an example with a selector to filter out specific bars, based on some properties:
One possibility is having a table that is a specific view of the data source and use the builtin filter to filter also the timeline sa well.
We need to use as data source for the timeline the displayed table data, using the method getDisplayedData
of the table.
The click handler, so far, is very basic and hardly useful. It's a click on the whole component, so clicking on a specific bar has the same effect as clicking on any other part of the component.
Plus, there is no selected bar functionality.
We hope they'll add those, as they usually do for other components.
While the Timeline component won’t replace specialized project management software, it’s a good addition for teams that already use Retool to build internal tools. If you’re building something more elaborate and want a visual way to track progress over time, the Timeline component integrates smoothly and gives your users an intuitive way to understand what's happening.