Skip to main content
Public

Share visualization

Loading preview…

Adding colorLegend to the radial chart

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Adding colorLegend to the radial chart

2
XXinting Yao
Last edited Oct 23, 2019
Created on Oct 22, 2019

This radial chart visualizes the on-time performance of USA airlines, displaying average departure and arrival delays. The chart uses two colored lines to represent the departure and arrival data, with a color legend explaining the distinction between the two metrics. The visualization is built with React and D3 v5, using `scaleTime` and `scaleLinear` for the angle and radius scales, `lineRadial` for the plotted lines, and `curveLinearClosed` to close the paths. Data comes from a CSV file of flight performance statistics.

AI-generated description

A radial chart of USA airlines on-time performance.

Things have done:

  • Used a cleaner way to transform the chart to center
  • Learned how to close the line: using d3.curveLinearClosed
  • Used a cleaner way to choose the range for radiusScale: innerRadius, outerRadius, angleAxisOffset
  • Added a colorLegend

Things doing:

  • Adding axes (tick marks and labels) for angle: using pointRadial
  • Making the colorLegend interactive

Things to do:

  • Adding axes (tick marks and labels) for radius
  • Choosing a range for the angle scale that represents some periodic amount of time, like years, months, or weeks.

Comments

Sign in to join the discussion.

MIT Licensed