Skip to main content
100%

Adding colorLegend to the radial chart

✓ Published2🌍 Public
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.
MIT Licensed

Similar vizzes