Architecture
CRM Analytics dashboards work with a clean separation of concerns. Widgets get data from queries, and pass selection back to them. Queries can pass selections to each other through faceting and receive global filters from the core runtime. Steps can also pass selections and data to other components via bindings.
Now you have a way to put your code into the mix while taking advantage of this entire system.
Mixing custom code in with widgets creates a powerful dynamic, and you have many ways to get state and configuration into your code. Meanwhile, you can communicate with the parent dashboard by setting selections on the associated query or using the setState method.