All impact tools

Dynamic charts and legend

Create a mobile-friendly map with a linked line or bar chart

Live interactive demo

Maps are a great tool for visualizing data, but sometimes it is difficult to present a complete analysis using only a map. One solution is to add a chart to your map. Bar graphs, trend lines, pie charts and other formats can be useful for comparing data values across geographical regions, over time, or against other variables to help users understand patterns and trends in data. 

There are a great many types of charts and numerous ways to approach building them. This tutorial explores a simplified example of using a line or bar chart (using the C3 library) that uses data uploaded to Mapbox Studio. The steps of the tutorial focus on how to configure the template code file to edit the chart component. 

Access the tutorial and template code here.

Maps built like this

View our finished example map at

Need more help? Ask questions on Stack Overflow or contact Mapbox Support. If you are working on a social good project, contact the Mapbox Community Team.

Want to share what you’ve built? Tweet it with #builtwithmapbox