Sunday, 5 July 2026

Time-Series Analytics in Apache Superset: Building a Daily Sales Line Chart

  

In modern data-driven systems, understanding how metrics evolve over time is critical. Whether you're tracking revenue, profit, or system usage, time-series visualizations help uncover trends, spikes, and anomalies.

 

In this post, we will use an orders dataset to build a line chart in Apache Superset that shows:

 

·      X-Axis order_date

·      Y-Axis SUM(final_amount)

 

This will help us visualize daily total sales trends.

 

Sample dataset looks like below.

order_id,user_id,order_status,order_date,total_amount,discount_amount,final_amount,payment_status,created_at
1,1,DELIVERED,2024-01-05T10:15:00,79999,5000,74999,PAID,2026-04-21T22:42:12.891475
2,2,DELIVERED,2024-01-07T14:20:00,17999,1000,16999,PAID,2026-04-21T22:42:12.891475
3,3,SHIPPED,2024-01-10T09:45:00,49999,3000,46999,PAID,2026-04-21T22:42:12.891475

   

Follow below step-by-step procedure to build a line chart.

 

Step 1: Navigate to the charts listing page.

 


Step 2: Create Line Chart.

 

Click on the button ‘+ Chart’.

 


Select ‘orders’ dataset, and Line Chart, click on Create new chart button. You will be taken to the Chart configuration page.

 


Drag and Drop order_date to the X-axis under Query section.

 


Drag and drop final_amount to the Metrics under Query section. Choose SUM as aggregate operation.

 


Click on ‘Create chart’ button, you can see that the line chart is rendered like below.

 

You can see that the date is displayed as number in x-axis, let’s configure exact date.

 

Navigate to Customize tab -> Under X Axis, expand Time format dropdown. You can see multiple options like below.

 

I selected %Y-%m-%d option.

  

Now you can observe that the chart change like below.

 


Set the Chart name as ‘Orders By Date’ and click on Save button.

 


Navigate to Charts listing page, you can see the chart available. 

 

 

 

  

Previous                                                    Next                                                    Home

No comments:

Post a Comment