Company
Date Published
Author
Artyom Keydunov
Word count
982
Language
English
Hacker News points
None

Summary

The text discusses how to define drill-downs in a data schema using Cube.js and build an interface to let users explore the underlying chart's data. The author starts by setting up a new project with Cube.js, configuring drill down support in the data schema, and generating a basic data schema for two tables: orders and users. They then use Cube.js templates to generate a frontend app, creating a bar chart to display orders over time and adding interactivity to let users click on specific groups and days to explore the underlying data. The author explains how to construct a query to load the underlying data using the ResultSet#drillDown() method and passes the user's click location as arguments to this method. They also discuss how to handle clicks, generate a drill-down query, and render the resulting data in a table within a modal window.