Skip to content

Commit

Permalink
Upgrade VuePress (1.x) and other dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbrunel committed Sep 8, 2019
1 parent e1347fc commit 14a44c2
Show file tree
Hide file tree
Showing 10 changed files with 14,586 additions and 17 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ cc-test-reporter
coverage/
dist/
node_modules/
package-lock.json
*.stackdump
6 changes: 5 additions & 1 deletion docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
module.exports = {
title: 'chartjs-plugin-datalabels',
description: 'Display labels on data for any type of charts.',
ga: 'UA-99068522-2',
head: [
['link', { rel: 'icon', href: `/favicon.png` }],
],
plugins: [
['@vuepress/google-analytics', {
ga: 'UA-99068522-2'
}]
],
themeConfig: {
repo: 'chartjs/chartjs-plugin-datalabels',
logo: '/favicon.png',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'override.styl'
@import 'palette.styl'

a
svg.icon.outbound
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/guide/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This plugin currently supports the following label events:
| `leave` | `mousemove` | the mouse is moved out of a label
| `click` | `click` | the mouse's primary button is pressed and released on a label

::: tip NOTE
::: tip
<sup>1</sup> [Chart.js events](http://www.chartjs.org/docs/latest/general/interactions/events.html) that need to be enabled in order to get the associated label event working. Note that by default Chart.js enables `"mousemove", "mouseout", "click", "touchstart", "touchmove", "touchend"`, meaning that label events work out-of-the-box.
:::

Expand Down
2 changes: 1 addition & 1 deletion docs/guide/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
npm install chartjs-plugin-datalabels --save
```

::: tip NOTE
::: tip
This plugin can also be installed using [Bower](https://bower.io/).
:::

Expand Down
2 changes: 1 addition & 1 deletion docs/guide/labels.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Labels

By default, a single label is created per data, however, it's possible to define multiple labels for each data element using the `labels` options. This option is an object where each property represents a new label, the key being the label key and the value being the options specific to each label. These options are merged on top of the options defined at the chart **and** dataset levels.
By default, a single label is created per data, however, it's possible to define multiple labels for each data element using the `labels` option. This option is an object where each property represents a new label, the key being the label key and the value being the options specific to each label. These options are merged on top of the options defined at the chart **and** dataset levels.

## Multiple Labels

Expand Down
4 changes: 2 additions & 2 deletions docs/guide/positioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The `clamp` option, when `true`, enforces the anchor position to be calculated b

![chartjs-plugin-datalabels](../assets/clamp.png)

::: tip NOTE
::: tip
If the element is fully hidden (i.e. entirely outside the chart area), anchor points will **not** be adjusted and thus will also be outside the viewport.
:::

Expand Down Expand Up @@ -65,7 +65,7 @@ The `display: 'auto'` option can be used to prevent overlapping labels, based on
- if both labels are `display: 'auto'`, the one with the highest data index will be hidden. If labels are at the same data index, the one with the highest dataset index will be hidden
- if one label is `display: true` and the other one is `display: 'auto'`, the one with `'auto'` will be hidden (whatever the data/dataset indices)

::: tip NOTE
::: tip
Labels with `display: false` don't contribute to the overlap detection.
:::

Expand Down
Loading

0 comments on commit 14a44c2

Please sign in to comment.