Skip to content

Commit

Permalink
Use latest Chart.js ESLint config (tab -> space)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbrunel committed Jan 5, 2021
1 parent 13daa47 commit fd33c23
Show file tree
Hide file tree
Showing 100 changed files with 6,285 additions and 6,280 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
!docs/.vuepress
**/*{.,-}min.js
dist/**/*
200 changes: 101 additions & 99 deletions docs/.vuepress/config.js
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 docs/.vuepress/plugins/chart-editor/components/ChartActions.vue
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>
Loading

0 comments on commit fd33c23

Please sign in to comment.