Nivo charts Documentation Explained: Props, Themes and Data Formats
Understand the Nivo charts documentation: chart pages, prop tables, data tabs, generated code, theming references and how to find answers faster.
Read guide
Nivo charts examples are the fastest way to understand what the library can do in a real product. Instead of reading every prop, seeing how charts combine into dashboards and reports shows which components suit each kind of data. The examples below describe practical layouts, the charts involved and the configuration choices that make them work.
A sales dashboard typically compares revenue across regions, channels or products. A ResponsiveBar with groupMode set to grouped places online and offline revenue side by side for each region, making differences obvious at a glance. KPI tiles above the chart, built as ordinary React components, show totals for the same period.
Setting indexBy to the region field and keys to the channel fields is all the data mapping required. Adding a legend through the legends prop and enabling labels only for wider bars, using labelSkipWidth, keeps the chart readable on smaller screens.
Traffic data is naturally a time series, so ResponsiveLine is the core component. Each metric, such as sessions or page views, becomes a series with an id and an array of x and y points. Turning on enableArea adds a soft fill that helps readers see volume as well as direction.
Setting enableSlices to x shows a single tooltip listing every series for the hovered date, which is ideal when comparing several metrics. A time scale on the x axis, configured through xScale, handles uneven date intervals correctly.
Markers let you draw a vertical line at an important date, such as a product launch or campaign start. Combining markers with a dashed series for a secondary metric keeps the main trend clear while still giving context.
Finance screens often pair a running balance with period-by-period cash flow. A line chart shows the balance trend, while a bar chart with positive and negative values shows monthly inflows and outflows. Nivo bar charts handle negative values naturally, drawing bars below the zero line.
Formatting matters in financial charts. The valueFormat prop and axis format options can add currency symbols, thousand separators and fixed decimal places so that figures match the rest of the application.
Management reports frequently track progress toward targets. Donut charts built with ResponsivePie, using a large innerRadius, work well as compact gauges, especially when a percentage is rendered in the centre through a custom layer. The @nivo/radial-bar package offers another way to compare several targets in one circular view.
For more detail, a bullet chart from @nivo/bullet shows actual values against ranges and target markers in a small horizontal space, making it a strong choice for scorecards.
| Report need | Suggested Nivo chart |
|---|---|
| Single percentage toward a goal | Pie with large innerRadius |
| Several targets compared | Radial bar |
| Actual vs range vs target | Bullet |
| Ranking changes over time | Bump |
Research projects often need to show distribution and correlation. ResponsiveScatterPlot plots individual observations on two numeric axes, and grouping data into series colours each category differently. Custom layers can add a regression line or reference areas on top of the points.
Heatmaps from @nivo/heatmap present matrices such as correlation tables, while box plots from @nivo/boxplot summarise distributions across groups. For very large samples, the Canvas versions keep interaction smooth.
ResponsiveCalendar lays out daily values across a year, producing the familiar contribution grid seen on developer platforms. It is ideal for habit tracking, support ticket volume or daily sales, where patterns by weekday and season matter.
The from and to props define the date range, and the data array contains day and value pairs. Colour steps come from a colours array, and empty days use emptyColor, which helps distinguish missing data from low values.
Budgets, storage usage and product catalogues are hierarchical. ResponsiveTreeMap shows each item as a rectangle sized by value, nested inside its parent, while ResponsiveSunburst presents the same structure as rings radiating from the centre.
Both charts expect a single root object with children arrays. Labels can be shown only for larger cells, and clicking a node can drive a drill-down view managed in React state.
Good examples start with a clear question and a data shape that matches the chosen chart. Starting from the live demos on nivo.rocks and adjusting the controls is often faster than writing configuration from scratch.
Dashboards feel coherent when charts share margins, fonts and colours. Place charts in a CSS grid with fixed row heights so responsive components always have a size to fill, and pass the same theme to each one.
Keeping data fetching in a parent component and passing slices of the result to each chart avoids repeated requests and makes cross-chart filtering straightforward.
The nivo.rocks website shows interactive demos for every chart, and the linked Storybook contains additional scenarios and edge cases.
Yes. Pass the same theme object to each chart so fonts, axes, grids and tooltips match across the whole layout.
Yes. Updating the data prop through React state re-renders the chart, and motion settings animate the transition between values.
Nivo charts examples show how a small set of components covers dashboards, analytics, finance, performance reports and research. Matching each question to the right chart and data shape is the key step, and the library handles axes, tooltips and motion for you.
Use these layouts as starting points, then refine them with the customisation techniques covered in the related article.