From 5a5d698b11ac7915ab640fd01e7a001f6a7b25e7 Mon Sep 17 00:00:00 2001 From: Evert Timberg Date: Mon, 28 Dec 2015 08:29:54 -0500 Subject: [PATCH] Fix some errors with docs that were noticed when building --- docs/01-Scales.md | 21 ++++++++++----------- docs/04-Radar-Chart.md | 11 +++++------ docs/07-Advanced.md | 4 ++-- 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/docs/01-Scales.md b/docs/01-Scales.md index 5bcab3303..9af33818b 100644 --- a/docs/01-Scales.md +++ b/docs/01-Scales.md @@ -1,14 +1,13 @@ --- -title: Getting started +title: Scales anchor: scales --- -###Scales - Scales in v2.0 of Chart.js are significantly more powerful, but also different than those of v1.0. -- Multiple x & y axes are now supported. -- A built-in label auto-skip feature now detects would-be overlapping ticks and labels and removes every nth label to keep things displaying normally. -- Scale titles are now supported +* Multiple x & y axes are now supported. +* A built-in label auto-skip feature now detects would-be overlapping ticks and labels and removes every nth label to keep things displaying normally. +* Scale titles are now supported +* New scale types can be extended without writing an entirely new chart type Every scale extends a core scale class with the following options: @@ -82,7 +81,7 @@ The `callback` method may be used for advanced tick customization. The following } ``` -#### Category Scale +### Category Scale The category scale will be familiar to those who have used v1.0. Labels are drawn in from the labels array included in the chart data. The category scale extends the core scale class with the following tick template: @@ -93,7 +92,7 @@ The category scale extends the core scale class with the following tick template } ``` -#### Linear Scale +### Linear Scale The linear scale can be used to display numerical data. It can be placed on either the x or y axis. The scatter chart type automatically configures a line chart to use one of these scales for the x axis. The linear scale extends the core scale class with the following tick template: @@ -130,7 +129,7 @@ The linear scale extends the core scale class with the following tick template: } ``` -#### Logarithmic Scale +### Logarithmic Scale The logarithmic scale is used to display logarithmic data of course. It can be placed on either the x or y axis. The log scale extends the core scale class with the following tick template: @@ -152,7 +151,7 @@ The log scale extends the core scale class with the following tick template: } ``` -#### Time Scale +### Time Scale The time scale is used to display times and dates. It can be placed on the x axis. When building its ticks, it will automatically calculate the most comfortable unit base on the size of the scale. The time scale extends the core scale class with the following tick template: @@ -229,7 +228,7 @@ The following time measurements are supported: } ``` -#### Radial Linear Scale +### Radial Linear Scale The radial linear scale is used specifically for the radar chart type. The radial linear scale extends the core scale class with the following tick template: diff --git a/docs/04-Radar-Chart.md b/docs/04-Radar-Chart.md index d20cdc850..358b2ee40 100644 --- a/docs/04-Radar-Chart.md +++ b/docs/04-Radar-Chart.md @@ -3,7 +3,7 @@ title: Radar Chart anchor: radar-chart --- -###Introduction +### Introduction A radar chart is a way of showing multiple data points and the variation between them. They are often useful for comparing the points of two or more different data sets. @@ -12,7 +12,7 @@ They are often useful for comparing the points of two or more different data set -###Example usage +### Example usage ```javascript var myRadarChart = new Chart(ctx, { @@ -22,7 +22,7 @@ var myRadarChart = new Chart(ctx, { }); ``` -###Data structure +### Data structure ```javascript var data = { labels: ["Eating", "Drinking", "Sleeping", "Designing", "Coding", "Cycling", "Running"], @@ -52,10 +52,10 @@ var data = { ``` For a radar chart, to provide context of what each point means, we include an array of strings that show around each point in the chart. For the radar chart data, we have an array of datasets. Each of these is an object, with a fill colour, a stroke colour, a colour for the fill of each point, and a colour for the stroke of each point. We also have an array of data values. - The label key on each dataset is optional, and can be used when generating a scale for the chart. -### Chart options + +### Chart Options These are the customisation options specific to Radar charts. These options are merged with the [global chart configuration options](#getting-started-global-chart-configuration), and form the options of the chart. @@ -91,4 +91,3 @@ new Chart(ctx, { ``` We can also change these defaults values for each Radar type that is created, this object is available at `Chart.defaults.radar`. - diff --git a/docs/07-Advanced.md b/docs/07-Advanced.md index 2263916c1..6c523f361 100644 --- a/docs/07-Advanced.md +++ b/docs/07-Advanced.md @@ -96,7 +96,7 @@ myLineChart.generateLegend(); Calling `getElementAtEvent(event)` on your Chart instance passing an argument of an event, or jQuery event, will return the single element at the event position. If there are multiple items within range, only the first is returned -```javscript +```javascript myLineChart.getElementAtEvent(e); // => returns the first element at the event point. ``` @@ -275,7 +275,7 @@ Optionally, the following methods may also be overwritten, but an implementation ``` The Core.Scale base class also has some utility functions that you may find useful. -```javscript +```javascript { // Returns true if the scale instance is horizontal isHorizontal: function(){},