Skip to content

Commit

Permalink
implement kurkles feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeLenaleee committed Feb 19, 2021
1 parent 51fed61 commit 4f4606f
Show file tree
Hide file tree
Showing 25 changed files with 67 additions and 50 deletions.
3 changes: 2 additions & 1 deletion docs/docs/axes/_common.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
### Common options to all axes
The common scale configuration can be adjusted in the `options.scales[scaleId]` namespace.

Namespace: `options.scales[scaleId]`

| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
Expand Down
3 changes: 2 additions & 1 deletion docs/docs/axes/_common_ticks.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
### Common tick options to all axes
The common tick options can be configured in the `options.scales[scaleId].ticks` namespace

Namespace: `options.scales[scaleId].ticks`

| Name | Type | Scriptable | Default | Description
| ---- | ---- | :-------------------------------: | ------- | -----------
Expand Down
3 changes: 2 additions & 1 deletion docs/docs/axes/cartesian/_common.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
### Common options to all cartesian axes
The common scale configuration can be adjusted in the `options.scales[scaleId]` namespace.

Namespace: `options.scales[scaleId]`

| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
Expand Down
3 changes: 2 additions & 1 deletion docs/docs/axes/cartesian/_common_ticks.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
### Common tick options to all cartesian axes
The common tick configuration can be adjusted in the `options.scales[scaleId].ticks` namespace.

Namespace: `options.scales[scaleId].ticks`

| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
Expand Down
3 changes: 2 additions & 1 deletion docs/docs/axes/cartesian/category.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ let chart = new Chart(ctx, {
## Configuration Options

### Category Axis specific options
The category scale specific configuration can be adjusted in the `options.scales[scaleId]` namespace.

Namespace: `options.scales[scaleId]`

| Name | Type | Description
| ---- | ---- | -----------
Expand Down
5 changes: 4 additions & 1 deletion docs/docs/axes/cartesian/linear.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ The linear scale is used to chart numerical data. It can be placed on either the

### Linear Axis specific options

Namespace: `options.scales[scaleId]`

| Name | Type | Description
| ---- | ---- | -----------
| `beginAtZero` | `boolean` | if true, scale will include 0 if it is not already included.
Expand All @@ -23,7 +25,8 @@ The linear scale is used to chart numerical data. It can be placed on either the
## Tick Configuration

### Linear Axis specific options
The linear scale specific configuration can be adjusted in the `options.scales[scaleId]` namespace.

Namespace: `options.scales[scaleId]`

| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
Expand Down
3 changes: 2 additions & 1 deletion docs/docs/axes/cartesian/logarithmic.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ The logarithmic scale is used to chart numerical data. It can be placed on eithe
## Tick Configuration

### Logarithmic Axis specific options
The logarithmic scale specific configuration can be adjusted in the `options.scales[scaleId]` namespace.

Namespace: `options.scales[scaleId]`

| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
Expand Down
3 changes: 2 additions & 1 deletion docs/docs/axes/cartesian/time.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ When providing data for the time scale, Chart.js uses timestamps defined as mill
## Configuration Options

### Time Axis specific options
The time scale specific configuration can be adjusted in the `options.scales[scaleId]` namespace.

Namespace: `options.scales[scaleId]`

| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/axes/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ In contrast to the `suggested*` settings, the `min` and `max` settings set expli

There are a number of config callbacks that can be used to change parameters in the scale at different points in the update process. The options are supplied at the top level of the axis options.

The callbacks configuration can be adjusted in the `options.scales[scaleId]` namespace.
Namespace: `options.scales[scaleId]`

| Name | Arguments | Description
| ---- | --------- | -----------
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/axes/labelling.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ When creating a chart, you want to tell the viewer what data they are viewing. T

## Scale Title Configuration

The scale label configuration can be adjusted in the `options.scales[scaleId].scaleLabel` namespace. It defines options for the scale title. Note that this only applies to cartesian axes.
Namespace: `options.scales[scaleId].scaleLabel`, it defines options for the scale title. Note that this only applies to cartesian axes.

| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
Expand Down
10 changes: 6 additions & 4 deletions docs/docs/axes/radial/linear.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ The following additional configuration options are provided by the radial linear
## Configuration Options

### Linear Radial Axis specific options
The radial linear scale specific configuration can be adjusted in the `options.scales[scaleId]` namespace.

Namespace: `options.scales[scaleId]`

| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
Expand All @@ -26,7 +27,8 @@ The radial linear scale specific configuration can be adjusted in the `options.s
## Tick Configuration

### Linear Radial Axis specific options
The radial linear scale tick specific configuration can be adjusted in the `options.scales[scaleId].ticks` namespace.

Namespace: `options.scales[scaleId].ticks`

| Name | Type | Scriptable | Default | Description
| ---- | ---- | ------- | ------- | -----------
Expand Down Expand Up @@ -102,7 +104,7 @@ let options = {
## Angle Line Options

The following options are used to configure angled lines that radiate from the center of the chart to the point labels.
The angle line specific configuration can be adjusted in the `options.scales[scaleId].angleLines` namespace.
Namespace: `options.scales[scaleId].angleLines`

| Name | Type | Scriptable | Default | Description
| ---- | ---- | ------- | ------- | -----------
Expand All @@ -119,7 +121,7 @@ The scriptable context is described in [Options](../../general/options.md#scale)
## Point Label Options

The following options are used to configure the point labels that are shown on the perimeter of the scale.
The point label specific configuration can be adjusted in the `options.scales[scaleId].pointLabels` namespace.
Namespace: `options.scales[scaleId].pointLabels`

| Name | Type | Scriptable | Default | Description
| ---- | ---- | ------- | ------- | -----------
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/axes/styling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ There are a number of options to allow styling an axis. There are settings to co

## Grid Line Configuration

The scale label configuration can be adjusted in the `options.scales[scaleId].gridLines` namespace. It defines options for the grid lines that run perpendicular to the axis.
Namespace: `options.scales[scaleId].gridLines`, it defines options for the grid lines that run perpendicular to the axis.

| Name | Type | Scriptable | Indexable | Default | Description
| ---- | ---- | :-------------------------------: | :-----------------------------: | ------- | -----------
Expand Down Expand Up @@ -41,7 +41,7 @@ The scriptable context is described in [Options](../general/options.md#tick) sec

## Major Tick Configuration

The scale label configuration can be adjusted in the `options.scales[scaleId].ticks.major` namespace. It defines options for the major tick marks that are generated by the axis.
Namespace: `options.scales[scaleId].ticks.major`, it defines options for the major tick marks that are generated by the axis.

| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
Expand Down
10 changes: 6 additions & 4 deletions docs/docs/configuration/animations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ function example() {

## Animation Configuration

The animation configuration can be adjusted in the `options.animation` namespace. The global options are defined in `Chart.defaults.animation`.
The default configuration is defined here: <a href="https://github.com/chartjs/Chart.js/blob/master/src/core/core.animations.js#L6-L55" target="_blank">core.animations.js</a>
Namespace: `options.animation`, the global options are defined in `Chart.defaults.animation`.

| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
Expand All @@ -133,7 +133,8 @@ A custom mode can be used by passing a custom `mode` to [update](../developers/a
A mode option is defined by the same options of the main [animation configuration](#animation-configuration).

### Default modes
The animation mode configuration can be adjusted in the `options.animation` namespace.

Namespace: `options.animation`

| Mode | Option | Value | Description
| -----| ------ | ----- | -----
Expand All @@ -146,10 +147,11 @@ The animation mode configuration can be adjusted in the `options.animation` name

## Animation property configuration

The animation property configuration can be adjusted in the `options.animation[animation]` namespace.
Property option configures which element property to use to animate the chart and its starting and ending values.
A property option is defined by the same options of the main [animation configuration](#animation-configuration), adding the following ones:

Namespace: `options.animation[animation]`

| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
| `type` | `string` | `typeof property` | Type of property, determines the interpolator used. Possible values: `'number'`, `'color'` and `'boolean'`. Only really needed for `'color'`, because `typeof` does not get that right.
Expand Down Expand Up @@ -240,7 +242,7 @@ See [Robert Penner's easing equations](http://robertpenner.com/easing/).
The animation configuration provides callbacks which are useful for synchronizing an external draw to the chart animation.
The callbacks can be set only at main [animation configuration](#animation-configuration).

The callbacks configuration can be adjusted in the `options.animation` namespace.
Namespace: `options.animation`

| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/configuration/decimation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The decimation plugin can be used with line charts to automatically decimate dat

## Configuration Options

The decimation plugin configuration can be adjusted in the `options.plugins.decimation` namespace. The global options for the plugin are defined in `Chart.defaults.plugins.decimation`.
Namespace: `options.plugins.decimation`, the global options for the plugin are defined in `Chart.defaults.plugins.decimation`.

| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
Expand Down
3 changes: 2 additions & 1 deletion docs/docs/configuration/device-pixel-ratio.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ For applications where a chart will be converted to a bitmap, or printed to a hi
Setting `devicePixelRatio` to a value other than 1 will force the canvas size to be scaled by that amount, relative to the container size. There should be no visible difference on screen; the difference will only be visible when the image is zoomed or printed.

## Configuration Options
The device pixel ratio configuration can be adjusted in the `options` namespace (root of options object)

Namespace: `options`

| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
Expand Down
8 changes: 4 additions & 4 deletions docs/docs/configuration/elements.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Chart.defaults.elements.bar.borderWidth = 2;

Point elements are used to represent the points in a line, radar or bubble chart.

The point element configuration is passed into the `options.elements.point` namespace. Global point options: `Chart.defaults.elements.point`.
Namespace: `options.elements.point`, global point options: `Chart.defaults.elements.point`.

| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
Expand Down Expand Up @@ -51,7 +51,7 @@ If the value is an image, that image is drawn on the canvas using [drawImage](ht

Line elements are used to represent the line in a line chart.

The line element configuration can be adjusted in the `options.elements.line` namespace. Global line options: `Chart.defaults.elements.line`.
Namespace: `options.elements.line`, global line options: `Chart.defaults.elements.line`.

| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
Expand All @@ -72,7 +72,7 @@ The line element configuration can be adjusted in the `options.elements.line` na

Bar elements are used to represent the bars in a bar chart.

The bar element configuration can be adjusted in the `options.elements.bar` namespace. Global bar options: `Chart.defaults.elements.bar`.
Namespace: `options.elements.bar`, global bar options: `Chart.defaults.elements.bar`.

| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
Expand All @@ -87,7 +87,7 @@ The bar element configuration can be adjusted in the `options.elements.bar` name

Arcs are used in the polar area, doughnut and pie charts.

The arc element configuration can be adjusted in the `options.elements.arc` namespace. Global arc options: `Chart.defaults.elements.arc`.
Namespace: `options.elements.arc`, global arc options: `Chart.defaults.elements.arc`.

| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/configuration/interactions/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Events
---

The following properties define how the chart interacts with events.
The events configuration can be adjusted in the `options` namespace (root of options object)
Namespace: `options`

| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/configuration/interactions/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Interactions
---

The interaction configuration can be adjusted in the `options.interaction` namespace. The global interaction configuration is at `Chart.defaults.interaction`. To configure which events trigger chart interactions, see [events](events.md#events).
Namespace: `options.interaction`, the global interaction configuration is at `Chart.defaults.interaction`. To configure which events trigger chart interactions, see [events](events.md#events).

| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/configuration/layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Layout
---

The layout configuration can be adjusted in the `options.layout` namespace. The global options for the chart layout is defined in `Chart.defaults.layout`.
Namespace: `options.layout`, the global options for the chart layout is defined in `Chart.defaults.layout`.

| Name | Type | Default | [Scriptable](../general/options.md#scriptable-options) | Description
| ---- | ---- | ------- | :----: | -----------
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/configuration/legend.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The chart legend displays data about the datasets that are appearing on the char

## Configuration options

The legend configuration can be adjusted in the `options.plugins.legend` namespace. The global options for the chart legend is defined in `Chart.defaults.plugins.legend`.
Namespace: `options.plugins.legend`, the global options for the chart legend is defined in `Chart.defaults.plugins.legend`.

| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
Expand Down Expand Up @@ -46,7 +46,7 @@ Defaults to `'center'` for unrecognized values.

## Legend Label Configuration

The legend label configuration is nested below the legend configuration using the `options.plugins.legend.labels` namespace.
Namespace: `options.plugins.legend.labels`

| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
Expand All @@ -63,7 +63,7 @@ The legend label configuration is nested below the legend configuration using th

## Legend Title Configuration

The legend title configuration is nested below the legend configuration using the `options.plugins.legend.title` namespace.
Namespace: `options.plugins.legend.title`

| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
Expand Down
3 changes: 2 additions & 1 deletion docs/docs/configuration/locale.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ with all present components separated by hyphens.
By default the chart is using the default locale of the platform which is running on.

## Configuration Options
The locale configuration can be adjusted in the `options` namespace (root of options object)

Namespace: `options`

| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
Expand Down
3 changes: 2 additions & 1 deletion docs/docs/configuration/responsive.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ The following examples **do not work**:
Chart.js provides a [few options](#configuration-options) to enable responsiveness and control the resize behavior of charts by detecting when the canvas *display* size changes and update the *render* size accordingly.

## Configuration Options
The performance configuration can be adjusted in the `options` namespace (root of options object)

Namespace: `options`

| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/configuration/title.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The chart title defines text to draw at the top of the chart.

## Title Configuration

The title configuration can be adjusted in the `options.plugins.title` namespace. The global options for the chart title is defined in `Chart.defaults.plugins.title`.
Namespace: `options.plugins.title`, the global options for the chart title is defined in `Chart.defaults.plugins.title`.

| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/configuration/tooltip.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Tooltip

## Tooltip Configuration

The tooltip configuration can be adjusted in the `options.plugins.tooltip` namespace. The global options for the chart tooltips is defined in `Chart.defaults.plugins.tooltip`.
Namespace: `options.plugins.tooltip`, the global options for the chart tooltips is defined in `Chart.defaults.plugins.tooltip`.

| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
Expand Down Expand Up @@ -101,7 +101,7 @@ Allows filtering of [tooltip items](#tooltip-item-context). Must implement at mi

## Tooltip Callbacks

The tooltip label configuration is nested below the tooltip configuration using the `options.plugins.tooltip.callbacks` namespace. The tooltip has the following callbacks for providing text. For all functions, `this` will be the tooltip object created from the `Tooltip` constructor.
Namespace: `options.plugins.tooltip.callbacks`, the tooltip has the following callbacks for providing text. For all functions, `this` will be the tooltip object created from the `Tooltip` constructor.

All functions are called with the same arguments: a [tooltip item context](#tooltip-item-context). All functions must return either a string or an array of strings. Arrays of strings are treated as multiple lines of text.

Expand Down
Loading

0 comments on commit 4f4606f

Please sign in to comment.