Skip to content

Ashutosh00710/github-readme-activity-graph

Repository files navigation

Github Readme Activity Graph

A dynamically generated activity graph to show your GitHub activities of last 31 days.

Table of contents

How to Use

Just paste the following URL in your profile readme and you are good to go.

Pass your username in the URL

[![Ashutosh's github activity graph](https://activity-graph.herokuapp.com/graph?username=Ashutosh00710)](https://github.com/ashutosh00710/github-readme-activity-graph)

Use themes

username=ashutosh00710&theme=theme_name

[![Ashutosh's github activity graph](https://activity-graph.herokuapp.com/graph?username=Ashutosh00710&theme=dracula)](https://github.com/ashutosh00710/github-readme-activity-graph)

Manual Customization is also available

Available Themes

NamePreview
Default (cotton candy)graph
draculagraph
gruvboxgraph
roguegraph
githubgraph
redicalgraph
xcodegraph
coralgraph

Customization

Customize the appearance of your Activity Graph however you want with URL params.

Common Options

ArgumentsDescriptionType of Value
bg_colorcard's background colorhex code (without #)
colorgraph card's text colorhex code (without #)
linegraph's line colorhex code (without #)
pointcolor of points on line graphhex code (without #)
areashows area under the graphboolean (default: false)
hide_bordermakes the border of the graph transparentboolean (default: false)
themename of available themesstring

Example:

[![Ashutosh's github activity graph](https://activity-graph.herokuapp.com/graph?username=ashutosh00710&bg_color=f4fa9c&color=17b978&line=17b978&point=17b978&area=true&hide_border=true)](https://github.com/ashutosh00710/github-readme-activity-graph)

Deploy on your own Heroku instance

The GitHub API only allows limited requests per hour, my activity-graph.herokuapp.com/graph could possibly hit the rate limiter. If you host it on your own Heroku server, then you don't have to worry about anything.

You may use the server used by this project at https://activity-graph.herokuapp.com and pass in your username to access your graph. E.g. https://activity-graph.herokuapp.com/graph?username=<your_username>

However, if there are a large number of requests or if the heroku account being used for the project runs out of dyno hours your graph will not load.

Set up your server

  1. Make a Heroku account.
  2. Install the Heroku CLI
  3. Clone the repository: git clone https://github.com/Ashutosh00710/github-readme-activity-graph.git
  4. Navigate in to the directory: cd github-readme-activity-graph
  5. Login to Heroku: heroku login
  6. Create Heroku app: heroku create and copy the URL you are given as output.
  7. Deploy app to heroku: git push heroku main
  8. Generate personal access token. Copy your token.
  9. Set token as heroku config var: heroku config:set TOKEN=<your token goes here>

Now just add the following to your profile readme and you're good to go.

![Github Activity Graph](<url from step 6>/graph?username=<username>)

Contributing

Please read through our contributing guidelines. Included are directions for opening issues, coding standards, and notes on development.

Resources Used to build this project

PurposeLibrary NameLink
Graph ConstructionCHARTISH.JShttps://github.com/gionkunz/chartist-js


Made with ❤ and TypeScript