Open in app

Sign In

Write

Sign In

Hankthemason
Hankthemason

2 Followers

Home

About

Jun 3, 2021

Using Chart.js’s legendCallback and generateLegend() with React hooks

There’s not much information on how to use the ‘legendCallback’ option to generate a custom legend, especially with React functional components/hooks. I’m going to show you how to do it! I needed to create a custom legend to address discrepancies in size between two side-by-side Doughnut charts with different amounts…

Chartjs

4 min read

Using Chart.js’s legendCallback and generateLegend() with React hooks
Using Chart.js’s legendCallback and generateLegend() with React hooks
Chartjs

4 min read


May 12, 2021

Build a map of NYC’s police precincts with React & D3, Part 2

In Part 2 of this tutorial, we are going to turn our basic map into a heat map that visualizes the amount of total allegations filed against each precinct. If you missed Part 1, I recommend reading that first. Now that we have a basic working map, let’s use it…

React

3 min read

Build a map of NYC’s police precincts with React & D3, Part 2
Build a map of NYC’s police precincts with React & D3, Part 2
React

3 min read


May 11, 2021

Build a map of NYC’s police precincts with React & D3, Part 1

We are going to use React and D3 to build a map of police precincts in NYC. Then we’ll use publicly available records on NYPD misconduct to turn it into a colorized heat map. Let’s get started! Step 1: Create a new react app and install D3 Open a new…

React

4 min read

Build a map of NYC’s police precincts with React & D3, Part 1
Build a map of NYC’s police precincts with React & D3, Part 1
React

4 min read

Hankthemason

Hankthemason

2 Followers

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech