/line-chart-with-gradient

Republic of Korea GDP per capita (1990 - 2017)

Primary LanguageJavaScript

Line chart with gradient

The interactive line chart shows the Republic of Korea GDP per capita between 1990 and 2017. Hovering over data points causes tooltips containing GDP per capita values to appear.

The visualization is implemented with D3.js version 5.7.0. The SVG gradient placed below the line is based on Nadieh Bremer's tutorial.

Getting started

  • Clone or download the repository.

  • Run a local web server1 so that the external data file can be loaded.

  • Interact with the line chart in your web browser.

1 If Python is installed on the computer, execute one of the following to run a web server locally on port 8000:

  • python -m SimpleHTTPServer 8000 for Python 2.x
  • python -m http.server 8000 for Python 3.x

Data source

The World Bank Group