Skip to content

Commit

Permalink
add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
stockiNail committed Jul 11, 2023
1 parent 87467c0 commit 8311e40
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/guide/types/_commonInnerLabel.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ All of these options can be [Scriptable](../options.md#scriptable-options)
| `drawTime` | `string` | `options.drawTime` | See [drawTime](../options#draw-time). Defaults to the annotation draw time if unset
| [`font`](#fonts-and-colors) | [`Font`\|`Font[]`](../options#font) | `{ weight: 'bold' }` | Label font
| `height` | `number`\|`string` | `undefined` | Overrides the height of the image or canvas element. Could be set in pixel by a number, or in percentage of current height of image or canvas element by a string. If undefined, uses the height of the image or canvas element. It is used only when the content is an image or canvas element.
| `hitTolerance` | `number` | `undefined` | Amount of pixels to interact with annotations within some distance of the mouse point.
| `opacity` | `number` | `undefined` | Overrides the opacity of the image or canvas element. Could be set a number in the range 0.0 to 1.0, inclusive. If undefined, uses the opacity of the image or canvas element. It is used only when the content is an image or canvas element.
| `padding` | [`Padding`](../options.md#padding) | `6` | The padding to add around the text label.
| [`position`](#position) | `string`\|`{x: string, y: string}` | `'center'` | Anchor position of label in the annotation.
Expand Down
1 change: 1 addition & 0 deletions docs/guide/types/_commonOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The following options are available for all annotations.
| [`borderShadowColor`](#styling) | [`Color`](../options.md#color) | Yes | `'transparent'`
| [`display`](#general) | `boolean` | Yes | `true`
| [`drawTime`](#general) | `string` | Yes | `'afterDatasetsDraw'`
| [`hitTolerance`](#general) | `number` | Yes | `0`
| [`init`](../configuration.html#common) | `boolean` | [See initial animation](../configuration.html#initial-animation) | `undefined`
| [`id`](#general) | `string` | No | `undefined`
| [`shadowBlur`](#styling) | `number` | Yes | `0`
Expand Down
1 change: 1 addition & 0 deletions docs/guide/types/box.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ If one of the axes does not match an axis in the chart, the box will take the en
| `adjustScaleRange` | Should the scale range be adjusted if this annotation is out of range.
| `display` | Whether or not this annotation is visible.
| `drawTime` | See [drawTime](../options.md#draw-time).
| `hitTolerance` | Amount of pixels to interact with annotations within some distance of the mouse point.
| `id` | Identifies a unique id for the annotation and it will be stored in the element context. When the annotations are defined by an object, the id is automatically set using the key used to store the annotations in the object. When the annotations are configured by an array, the id, passed by this option in the annotation, will be used.
| `rotation` | Rotation of the box in degrees.
| `xMax` | Right edge of the box in units along the x axis.
Expand Down
1 change: 1 addition & 0 deletions docs/guide/types/ellipse.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ If one of the axes does not match an axis in the chart, the ellipse will take th
| `adjustScaleRange` | Should the scale range be adjusted if this annotation is out of range.
| `display` | Whether or not this annotation is visible.
| `drawTime` | See [drawTime](../options.md#draw-time).
| `hitTolerance` | Amount of pixels to interact with annotations within some distance of the mouse point.
| `id` | Identifies a unique id for the annotation and it will be stored in the element context. When the annotations are defined by an object, the id is automatically set using the key used to store the annotations in the object. When the annotations are configured by an array, the id, passed by this option in the annotation, will be used.
| `rotation` | Rotation of the ellipse in degrees, default is 0.
| `xMax` | Right edge of the ellipse in units along the x axis.
Expand Down
1 change: 1 addition & 0 deletions docs/guide/types/label.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ The 4 coordinates, xMin, xMax, yMin, yMax are optional. If not specified, the bo
| `display` | Whether or not this annotation is visible.
| `drawTime` | See [drawTime](../options.md#draw-time).
| `height` | Overrides the height of the image or canvas element. Could be set in pixel by a number, or in percentage of current height of image or canvas element by a string. If undefined, uses the height of the image or canvas element. It is used only when the content is an image or canvas element.
| `hitTolerance` | Amount of pixels to interact with annotations within some distance of the mouse point.
| `id` | Identifies a unique id for the annotation and it will be stored in the element context. When the annotations are defined by an object, the id is automatically set using the key used to store the annotations in the object. When the annotations are configured by an array, the id, passed by this option in the annotation, will be used.
| `padding` | The padding to add around the text label.
| `rotation` | Rotation of the label in degrees.
Expand Down
3 changes: 3 additions & 0 deletions docs/guide/types/line.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ If `scaleID` is unset, then `xScaleID` and `yScaleID` are used to draw a line fr
| `display` | Whether or not this annotation is visible.
| `drawTime` | See [drawTime](../options.md#draw-time).
| `endValue` | End two of the line when a single scale is specified.
| `hitTolerance` | Amount of pixels to interact with annotations within some distance of the mouse point.
| `id` | Identifies a unique id for the annotation and it will be stored in the element context. When the annotations are defined by an object, the id is automatically set using the key used to store the annotations in the object. When the annotations are configured by an array, the id, passed by this option in the annotation, will be used.
| `scaleID` | ID of the scale in single scale mode. If unset, `xScaleID` and `yScaleID` are used.
| `value` | End one of the line when a single scale is specified.
| `xMax` | X coordinate of end two of the line in units along the x axis.
Expand Down Expand Up @@ -137,6 +139,7 @@ All of these options can be [Scriptable](../options.md#scriptable-options)
| `drawTime` | `string` | `options.drawTime` | See [drawTime](../options#draw-time). Defaults to the line annotation draw time if unset.
| [`font`](#fonts-and-colors) | [`Font`\|`Font[]`](../options#font) | `{ weight: 'bold' }` | Label font.
| `height` | `number`\|`string` | `undefined` | Overrides the height of the image or canvas element. Could be set in pixel by a number, or in percentage of current height of image or canvas element by a string. If undefined, uses the height of the image or canvas element. It is used only when the content is an image or canvas element.
| `hitTolerance` | `number` | `undefined` | Amount of pixels to interact with annotations within some distance of the mouse point.
| `opacity` | `number` | `undefined` | Overrides the opacity of the image or canvas element. Could be set a number in the range 0.0 to 1.0, inclusive. If undefined, uses the opacity of the image or canvas element. It is used only when the content is an image or canvas element.
| `padding` | [`Padding`](../options.md#padding) | `6` | The padding to add around the text label.
| `position` | `string` | `'center'` | Anchor position of label on line. Possible options are: `'start'`, `'center'`, `'end'`. It can be set by a string in percentage format `'number%'` which are representing the percentage on the width of the line where the label will be located.
Expand Down
1 change: 1 addition & 0 deletions docs/guide/types/point.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ The 4 coordinates, xMin, xMax, yMin, yMax are optional. If not specified, the bo
| `adjustScaleRange` | Should the scale range be adjusted if this annotation is out of range.
| `display` | Whether or not this annotation is visible.
| `drawTime` | See [drawTime](../options.md#draw-time).
| `hitTolerance` | Amount of pixels to interact with annotations within some distance of the mouse point.
| `id` | Identifies a unique id for the annotation and it will be stored in the element context. When the annotations are defined by an object, the id is automatically set using the key used to store the annotations in the object. When the annotations are configured by an array, the id, passed by this option in the annotation, will be used.
| `radius` | Size of the point in pixels.
| `rotation` | Rotation of point, in degrees.
Expand Down
1 change: 1 addition & 0 deletions docs/guide/types/polygon.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ The 4 coordinates, xMin, xMax, yMin, yMax are optional. If not specified, the bo
| `adjustScaleRange` | Should the scale range be adjusted if this annotation is out of range.
| `display` | Whether or not this annotation is visible.
| `drawTime` | See [drawTime](../options.md#draw-time).
| `hitTolerance` | Amount of pixels to interact with annotations within some distance of the mouse point.
| `id` | Identifies a unique id for the annotation and it will be stored in the element context. When the annotations are defined by an object, the id is automatically set using the key used to store the annotations in the object. When the annotations are configured by an array, the id, passed by this option in the annotation, will be used.
| `radius` | Size of the polygon in pixels.
| `rotation` | Rotation of polygon, in degrees.
Expand Down

0 comments on commit 8311e40

Please sign in to comment.