Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/GSI/jekyll_date_chart


https://github.com/GSI/jekyll_date_chart

Last synced: 18 days ago
JSON representation

Lists

README

        

h1. Jekyll Date Chart

This Jekyll plugin renders date-related line charts based on textile-formatted tables.

While the plugin focuses on the presentation of financial data, it may also be used to display other date-related statistics.

!screenshots/jekyll_date_chart.png(Example chart generated via Jekyll Date Chart)!

The actual charts are drawn via JavaScript using "morris.js(morris.js - good-looking charts shouldn't be difficult)":http://www.oesmith.co.uk/morris.js/ relying on "Raphaël(Raphaël - JavaScript library for simplified work with vector graphics)":http://raphaeljs.com/ and "JQuery(JQuery - write less, do more)":http://jquery.com/.

h2. Installation

h3. Step 1: Install and include the gem

Set the constant @PATH_TO_JEKYLL_SITE@ correctly and execute these commands accordingly:

pre. cd $PATH_TO_JEKYLL_SITE
echo "gem 'jekyll_date_chart'" >> Gemfile
bundle
echo "require 'jekyll_date_chart'" >> _plugins/ext.rb

*Alternatively* you may accomplish the same _without_ @echo@ and @bundle@:

# Install the plugin by running @gem install jekyll_date_chart@
# Add the line @require 'jekyll_date_chart'@ to *_plugins/ext.rb*

h3. Step 2: Generate the required JavaScript libraries

For convenience, **Jekyll Date Chart** ships **Raphaël** and **morris.js**.

In order to copy these two libraries, execute the newly available @jekyll_date_chart@ command from within the project directory:

pre. cd $PATH_TO_JEKYLL_SITE
jekyll_date_chart generate

_*Note:* As **JQuery** is commonly used in many projects, it has to be manually installed if currently missing._

h3. Step 3: Include the morris.js CSS in the HTML template

Ensure that the file @morris.css@ is properly loaded by adding the following statement to the **head** element of the HTML template:

pre. {% stylesheet morris.css %}

_Based on your setup you may want to use the minified version **morris.min.css** instead._

h3. Step 4: Include all required JavaScript libraries in the HTML template

Typically just before your *closing HTML body tag* (@