-
Notifications
You must be signed in to change notification settings - Fork 489
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use latest Chart.js ESLint config (tab -> space)
- Loading branch information
1 parent
13daa47
commit fd33c23
Showing
100 changed files
with
6,285 additions
and
6,280 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
!docs/.vuepress | ||
**/*{.,-}min.js | ||
dist/**/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,104 +1,106 @@ | ||
const ChartEditorPlugin = require('./plugins/chart-editor'); | ||
|
||
module.exports = { | ||
title: 'chartjs-plugin-datalabels', | ||
description: 'Display labels on data for any type of charts.', | ||
head: [ | ||
['link', { rel: 'icon', href: `/favicon.png` }], | ||
], | ||
plugins: [ | ||
['@vuepress/google-analytics', { | ||
ga: 'UA-99068522-2' | ||
}], | ||
['redirect', { | ||
redirectors: [ | ||
// Default sample page when accessing /samples. | ||
{ base: '/samples', alternative: ['charts/line'] }, | ||
], | ||
}], | ||
[require('./plugins/chart-editor'), { | ||
defaults: { | ||
global: { | ||
legend: { | ||
display: false | ||
}, | ||
title: { | ||
display: false | ||
}, | ||
tooltips: { | ||
enabled: false | ||
} | ||
} | ||
} | ||
}], | ||
title: 'chartjs-plugin-datalabels', | ||
description: 'Display labels on data for any type of charts.', | ||
head: [ | ||
['link', {rel: 'icon', href: '/favicon.png'}], | ||
], | ||
plugins: [ | ||
['@vuepress/google-analytics', { | ||
ga: 'UA-99068522-2' | ||
}], | ||
['redirect', { | ||
redirectors: [ | ||
// Default sample page when accessing /samples. | ||
{base: '/samples', alternative: ['charts/line']}, | ||
], | ||
}], | ||
[ChartEditorPlugin, { | ||
defaults: { | ||
global: { | ||
legend: { | ||
display: false | ||
}, | ||
title: { | ||
display: false | ||
}, | ||
tooltips: { | ||
enabled: false | ||
} | ||
} | ||
} | ||
}], | ||
], | ||
themeConfig: { | ||
repo: 'chartjs/chartjs-plugin-datalabels', | ||
logo: '/favicon.png', | ||
lastUpdated: 'Last Updated', | ||
editLinks: true, | ||
docsDir: 'docs', | ||
algolia: { | ||
apiKey: '7224f458f773f7cf4cbbc4c53621d30c', | ||
indexName: 'chartjs-plugin-datalabels' | ||
}, | ||
nav: [ | ||
{text: 'Home', link: '/'}, | ||
{text: 'Guide', link: '/guide/'}, | ||
{text: 'Samples', link: '/samples/'}, | ||
], | ||
themeConfig: { | ||
repo: 'chartjs/chartjs-plugin-datalabels', | ||
logo: '/favicon.png', | ||
lastUpdated: 'Last Updated', | ||
editLinks: true, | ||
docsDir: 'docs', | ||
algolia: { | ||
apiKey: '7224f458f773f7cf4cbbc4c53621d30c', | ||
indexName: 'chartjs-plugin-datalabels' | ||
sidebar: { | ||
'/guide/': [ | ||
'', | ||
'getting-started', | ||
'options', | ||
'labels', | ||
'positioning', | ||
'formatting', | ||
'events', | ||
'typescript', | ||
'migration', | ||
], | ||
'/samples/': [ | ||
{ | ||
title: 'Charts', | ||
collapsable: false, | ||
children: [ | ||
'charts/line', | ||
'charts/bar', | ||
'charts/doughnut', | ||
'charts/polar', | ||
'charts/radar', | ||
'charts/bubble', | ||
], | ||
}, | ||
{ | ||
title: 'Scriptable', | ||
collapsable: false, | ||
children: [ | ||
'scriptable/interactions', | ||
'scriptable/data', | ||
'scriptable/dataset', | ||
'scriptable/indices', | ||
'scriptable/mirror', | ||
], | ||
}, | ||
{ | ||
title: 'Events', | ||
collapsable: false, | ||
children: [ | ||
'events/listeners', | ||
'events/highlight', | ||
'events/selection', | ||
], | ||
}, | ||
nav: [ | ||
{ text: 'Home', link: '/' }, | ||
{ text: 'Guide', link: '/guide/' }, | ||
{ text: 'Samples', link: '/samples/' }, | ||
], | ||
sidebar: { | ||
'/guide/': [ | ||
'', | ||
'getting-started', | ||
'options', | ||
'labels', | ||
'positioning', | ||
'formatting', | ||
'events', | ||
'typescript', | ||
'migration', | ||
], | ||
'/samples/': [ | ||
{ | ||
title: 'Charts', | ||
collapsable: false, | ||
children: [ | ||
'charts/line', | ||
'charts/bar', | ||
'charts/doughnut', | ||
'charts/polar', | ||
'charts/radar', | ||
'charts/bubble', | ||
], | ||
}, | ||
{ | ||
title: 'Scriptable', | ||
collapsable: false, | ||
children: [ | ||
'scriptable/interactions', | ||
'scriptable/data', | ||
'scriptable/dataset', | ||
'scriptable/indices', | ||
'scriptable/mirror', | ||
], | ||
}, | ||
{ | ||
title: 'Events', | ||
collapsable: false, | ||
children: [ | ||
'events/listeners', | ||
'events/highlight', | ||
'events/selection', | ||
], | ||
}, | ||
{ | ||
title: 'Advanced', | ||
collapsable: false, | ||
children: [ | ||
'advanced/multiple-labels', | ||
'advanced/custom-labels', | ||
], | ||
} | ||
] | ||
{ | ||
title: 'Advanced', | ||
collapsable: false, | ||
children: [ | ||
'advanced/multiple-labels', | ||
'advanced/custom-labels', | ||
], | ||
} | ||
] | ||
} | ||
} | ||
} | ||
}; |
74 changes: 37 additions & 37 deletions
74
docs/.vuepress/plugins/chart-editor/components/ChartActions.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,55 @@ | ||
<template> | ||
<div class="chart-actions"> | ||
<a v-for="action in actions" class="chart-action" @click="onClick(action)"> | ||
{{ action.name }} | ||
</a> | ||
</div> | ||
<div class="chart-actions"> | ||
<a v-for="action in actions" class="chart-action" @click="onClick(action)"> | ||
{{ action.name }} | ||
</a> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
props: { | ||
actions: Array, | ||
default: () => [], | ||
}, | ||
props: { | ||
actions: Array, | ||
default: () => [], | ||
}, | ||
methods: { | ||
onClick(action) { | ||
this.$emit('action', action); | ||
} | ||
}, | ||
methods: { | ||
onClick(action) { | ||
this.$emit('action', action); | ||
} | ||
}, | ||
} | ||
</script> | ||
|
||
<style lang="stylus" scoped> | ||
@import '../styles/palette.styl' | ||
.chart-actions | ||
align-items center | ||
display flex | ||
flex-wrap wrap | ||
align-items center | ||
display flex | ||
flex-wrap wrap | ||
.chart-action | ||
transition background .25s, border-color .25s | ||
background rgba($codeBgColor, 0.05) | ||
border 1px solid transparent | ||
border-radius $border-radius | ||
color $accentColor | ||
text-decoration none !important | ||
display inline-block | ||
font-size 0.8rem | ||
padding 8px 16px | ||
margin 0 8px 8px 0 | ||
cursor pointer | ||
user-select none | ||
transition background .25s, border-color .25s | ||
background rgba($codeBgColor, 0.05) | ||
border 1px solid transparent | ||
border-radius $border-radius | ||
color $accentColor | ||
text-decoration none !important | ||
display inline-block | ||
font-size 0.8rem | ||
padding 8px 16px | ||
margin 0 8px 8px 0 | ||
cursor pointer | ||
user-select none | ||
&:hover | ||
background rgba($accentColor, 0.15) | ||
border-color rgba($accentColor, 0.2) | ||
color $accentColor | ||
&:hover | ||
background rgba($accentColor, 0.15) | ||
border-color rgba($accentColor, 0.2) | ||
color $accentColor | ||
&:active | ||
background rgba($accentColor, 0.3) | ||
border-color rgba($accentColor, 0.4) | ||
color $accentColor | ||
&:active | ||
background rgba($accentColor, 0.3) | ||
border-color rgba($accentColor, 0.4) | ||
color $accentColor | ||
</style> |
Oops, something went wrong.