Description
Background
PureChart supports pie charts! But how does one create a pie chart? Unless we provide an answer to that question, developers will be forced to read through the source code and make educated guesses (which they won't do). That's why we will answer that question by providing documentation!
We are making a distinction between documentation for PureChart contributors and PureChart users. While contributors will be interested in the source code, users are only concerned with the external API. As a result...
- Documentation for contributors consists of source code comments, and
- Documentation for users consists of publicly available web pages
This repository is for the latter, so whenever we say "documentation" we are referring to the user documentation.
Goal
Add a page describing the way PureChart treats pie charts. Add a file called pie-charts.md
to the app/markdown
directory with the following sections -
- General Description, which describes the chart in question and provides an image of what it looks like
- Usage, which describes the helper method responsible for generating said chart and the arguments it takes
- Please be very clear about how the arguments should be formatted!
- For example, don't just say "it takes an argument containing raw data". Is the data in the form of a list? A hash? A list of hashes? What are all the fields and types that this argument has? Are any arguments or fields optional?
- Example, which has a short example controller and view
- Signify where there might be other code written by the users (such as the rest of the methods in the controller) with
...
- Signify where there might be other code written by the users (such as the rest of the methods in the controller) with
You will need to use Markdown for this! GitHub has an excellent guide for that. Good luck!
Guidance
Unfortunately we don't have a PR template in the PureChart repository yet, so you'll need to check out the source code and relevant PRs. In this case, the helper method is pie_chart
(in lib/purechart/chart_helper.rb
) and relevant PRs (here) are 21, 28, 31, and 33.