Chart.js/docs/.vuepress/config.js

322 lines
8.2 KiB
JavaScript
Raw Normal View History

const path = require('path');
const docsVersion = "VERSION";
const base = process.env.NODE_ENV === "development" ? '' : `/docs/${docsVersion}/`;
module.exports = {
title: 'Chart.js',
description: 'Open source HTML5 Charts for your website',
theme: 'chartjs',
base,
dest: path.resolve(__dirname, '../../dist/docs'),
head: [
['link', {rel: 'icon', href: '/favicon.ico'}],
],
plugins: [
'tabs',
2021-04-02 17:18:53 +02:00
['flexsearch'],
['@vuepress/html-redirect', {
countdown: 0,
}],
[
'@vuepress/google-analytics',
{
'ga': 'UA-28909194-3'
}
],
2021-04-02 16:56:32 +02:00
['redirect', {
redirectors: [
// Default sample page when accessing /samples.
{base: '/samples', alternative: ['bar/vertical']},
],
}],
[
'vuepress-plugin-typedoc',
{
entryPoints: ['../../types/index.esm.d.ts'],
hideInPageTOC: true,
tsconfig: '../../tsconfig.json',
sidebar: {
fullNames: true,
parentCategory: 'API',
},
},
],
],
chainWebpack(config) {
config.merge({
resolve: {
alias: {
'chart.js': path.resolve(__dirname, '../../dist/chart.esm.js'),
}
}
})
},
markdown: {
extendMarkdown: md => {
md.use(require('markdown-it-include'), path.resolve(__dirname, '../'));
}
},
themeConfig: {
repo: 'chartjs/Chart.js',
logo: '/favicon.ico',
lastUpdated: 'Last Updated',
searchPlaceholder: 'Search...',
editLinks: false,
docsDir: 'docs',
chart: {
imports: [
['scripts/register.js'],
['scripts/utils.js', 'Utils'],
Vuepress samples (#8756) * Generate API docs with vuepress-plugin-typedoc * Links, fixes, cleanup * Convert bar samples to Vuepress * Some line chart samples moved over * Fix lint issues * Derived axis type sample * LineAreaStacked chart created in vuepress * added radar area axample * Line dataset added sample * final area example added * Add derived-chart-type * Bar scriptable sample * Scriptable samples * Clean lint errors * added linear axis samples to vuepress * change tab to spaces to fix lint error * Convert the rest of the scale samples * Scale option samples * Fix typo * Fixes * Legend samples * Title samples * Change the title of the tip block to Note (#8758) * Convert bar samples to Vuepress * Some line chart samples moved over * Fix lint issues * Derived axis type sample * LineAreaStacked chart created in vuepress * added radar area axample * Line dataset added sample * final area example added * Add derived-chart-type * Bar scriptable sample * Scriptable samples * Clean lint errors * added linear axis samples to vuepress * change tab to spaces to fix lint error * Convert the rest of the scale samples * Scale option samples * Fix typo * Fixes * Legend samples * Advanced samples * Remove extra section * Animation samples * Hide legend from progressive line * Add a comment on what `from` does * Tooltip samples * Ädd other charts to vuepress samples * enable plugin again since all samples have been converted * fix skip radar example, middle skip was not calculated correctly * lint error * Progressive-line: add 2nd line * Fix lint errors Co-authored-by: Jukka Kurkela <jukka.kurkela@gmail.com> Co-authored-by: Jacco van den Berg <jaccoberg2281@gmail.com> Co-authored-by: Jacco van den Berg <39033624+LeeLenaleee@users.noreply.github.com>
2021-04-02 14:04:39 +02:00
['scripts/helpers.js', 'helpers'],
['scripts/components.js', 'components']
]
},
nav: [
{text: 'Home', link: '/'},
{text: 'API', link: '/api/'},
// TODO: Make local when samples moved to vuepress
Vuepress samples (#8756) * Generate API docs with vuepress-plugin-typedoc * Links, fixes, cleanup * Convert bar samples to Vuepress * Some line chart samples moved over * Fix lint issues * Derived axis type sample * LineAreaStacked chart created in vuepress * added radar area axample * Line dataset added sample * final area example added * Add derived-chart-type * Bar scriptable sample * Scriptable samples * Clean lint errors * added linear axis samples to vuepress * change tab to spaces to fix lint error * Convert the rest of the scale samples * Scale option samples * Fix typo * Fixes * Legend samples * Title samples * Change the title of the tip block to Note (#8758) * Convert bar samples to Vuepress * Some line chart samples moved over * Fix lint issues * Derived axis type sample * LineAreaStacked chart created in vuepress * added radar area axample * Line dataset added sample * final area example added * Add derived-chart-type * Bar scriptable sample * Scriptable samples * Clean lint errors * added linear axis samples to vuepress * change tab to spaces to fix lint error * Convert the rest of the scale samples * Scale option samples * Fix typo * Fixes * Legend samples * Advanced samples * Remove extra section * Animation samples * Hide legend from progressive line * Add a comment on what `from` does * Tooltip samples * Ädd other charts to vuepress samples * enable plugin again since all samples have been converted * fix skip radar example, middle skip was not calculated correctly * lint error * Progressive-line: add 2nd line * Fix lint errors Co-authored-by: Jukka Kurkela <jukka.kurkela@gmail.com> Co-authored-by: Jacco van den Berg <jaccoberg2281@gmail.com> Co-authored-by: Jacco van den Berg <39033624+LeeLenaleee@users.noreply.github.com>
2021-04-02 14:04:39 +02:00
{text: 'Samples', link: `/samples/`},
{
text: 'Ecosystem',
ariaLabel: 'Community Menu',
items: [
{ text: 'Awesome', link: 'https://github.com/chartjs/awesome' },
{ text: 'Slack', link: 'https://chartjs-slack.herokuapp.com/' },
{ text: 'Stack Overflow', link: 'https://stackoverflow.com/questions/tagged/chart.js' }
]
}
],
sidebar: {
'/api/': {
title: 'API'
},
Vuepress samples (#8756) * Generate API docs with vuepress-plugin-typedoc * Links, fixes, cleanup * Convert bar samples to Vuepress * Some line chart samples moved over * Fix lint issues * Derived axis type sample * LineAreaStacked chart created in vuepress * added radar area axample * Line dataset added sample * final area example added * Add derived-chart-type * Bar scriptable sample * Scriptable samples * Clean lint errors * added linear axis samples to vuepress * change tab to spaces to fix lint error * Convert the rest of the scale samples * Scale option samples * Fix typo * Fixes * Legend samples * Title samples * Change the title of the tip block to Note (#8758) * Convert bar samples to Vuepress * Some line chart samples moved over * Fix lint issues * Derived axis type sample * LineAreaStacked chart created in vuepress * added radar area axample * Line dataset added sample * final area example added * Add derived-chart-type * Bar scriptable sample * Scriptable samples * Clean lint errors * added linear axis samples to vuepress * change tab to spaces to fix lint error * Convert the rest of the scale samples * Scale option samples * Fix typo * Fixes * Legend samples * Advanced samples * Remove extra section * Animation samples * Hide legend from progressive line * Add a comment on what `from` does * Tooltip samples * Ädd other charts to vuepress samples * enable plugin again since all samples have been converted * fix skip radar example, middle skip was not calculated correctly * lint error * Progressive-line: add 2nd line * Fix lint errors Co-authored-by: Jukka Kurkela <jukka.kurkela@gmail.com> Co-authored-by: Jacco van den Berg <jaccoberg2281@gmail.com> Co-authored-by: Jacco van den Berg <39033624+LeeLenaleee@users.noreply.github.com>
2021-04-02 14:04:39 +02:00
'/samples/': [
{
title: 'Bar Charts',
children: [
'bar/vertical',
'bar/horizontal',
'bar/stacked',
'bar/stacked-groups',
'bar/floating',
'bar/border-radius',
]
},
{
title: 'Line Charts',
children: [
'line/line',
'line/multi-axis',
'line/stepped',
'line/interpolation',
'line/styling',
// 'line/point-styling',
'line/segments',
Vuepress samples (#8756) * Generate API docs with vuepress-plugin-typedoc * Links, fixes, cleanup * Convert bar samples to Vuepress * Some line chart samples moved over * Fix lint issues * Derived axis type sample * LineAreaStacked chart created in vuepress * added radar area axample * Line dataset added sample * final area example added * Add derived-chart-type * Bar scriptable sample * Scriptable samples * Clean lint errors * added linear axis samples to vuepress * change tab to spaces to fix lint error * Convert the rest of the scale samples * Scale option samples * Fix typo * Fixes * Legend samples * Title samples * Change the title of the tip block to Note (#8758) * Convert bar samples to Vuepress * Some line chart samples moved over * Fix lint issues * Derived axis type sample * LineAreaStacked chart created in vuepress * added radar area axample * Line dataset added sample * final area example added * Add derived-chart-type * Bar scriptable sample * Scriptable samples * Clean lint errors * added linear axis samples to vuepress * change tab to spaces to fix lint error * Convert the rest of the scale samples * Scale option samples * Fix typo * Fixes * Legend samples * Advanced samples * Remove extra section * Animation samples * Hide legend from progressive line * Add a comment on what `from` does * Tooltip samples * Ädd other charts to vuepress samples * enable plugin again since all samples have been converted * fix skip radar example, middle skip was not calculated correctly * lint error * Progressive-line: add 2nd line * Fix lint errors Co-authored-by: Jukka Kurkela <jukka.kurkela@gmail.com> Co-authored-by: Jacco van den Berg <jaccoberg2281@gmail.com> Co-authored-by: Jacco van den Berg <39033624+LeeLenaleee@users.noreply.github.com>
2021-04-02 14:04:39 +02:00
]
},
{
title: 'Other charts',
children: [
'other-charts/bubble',
'other-charts/scatter',
'other-charts/scatter-multi-axis',
'other-charts/doughnut',
'other-charts/pie',
'other-charts/multi-series-pie',
'other-charts/polar-area',
'other-charts/radar',
'other-charts/radar-skip-points',
'other-charts/combo-bar-line',
'other-charts/stacked-bar-line',
Vuepress samples (#8756) * Generate API docs with vuepress-plugin-typedoc * Links, fixes, cleanup * Convert bar samples to Vuepress * Some line chart samples moved over * Fix lint issues * Derived axis type sample * LineAreaStacked chart created in vuepress * added radar area axample * Line dataset added sample * final area example added * Add derived-chart-type * Bar scriptable sample * Scriptable samples * Clean lint errors * added linear axis samples to vuepress * change tab to spaces to fix lint error * Convert the rest of the scale samples * Scale option samples * Fix typo * Fixes * Legend samples * Title samples * Change the title of the tip block to Note (#8758) * Convert bar samples to Vuepress * Some line chart samples moved over * Fix lint issues * Derived axis type sample * LineAreaStacked chart created in vuepress * added radar area axample * Line dataset added sample * final area example added * Add derived-chart-type * Bar scriptable sample * Scriptable samples * Clean lint errors * added linear axis samples to vuepress * change tab to spaces to fix lint error * Convert the rest of the scale samples * Scale option samples * Fix typo * Fixes * Legend samples * Advanced samples * Remove extra section * Animation samples * Hide legend from progressive line * Add a comment on what `from` does * Tooltip samples * Ädd other charts to vuepress samples * enable plugin again since all samples have been converted * fix skip radar example, middle skip was not calculated correctly * lint error * Progressive-line: add 2nd line * Fix lint errors Co-authored-by: Jukka Kurkela <jukka.kurkela@gmail.com> Co-authored-by: Jacco van den Berg <jaccoberg2281@gmail.com> Co-authored-by: Jacco van den Berg <39033624+LeeLenaleee@users.noreply.github.com>
2021-04-02 14:04:39 +02:00
]
},
{
title: 'Area charts',
children: [
'area/line-boundaries',
'area/line-datasets',
'area/line-drawtime',
Vuepress samples (#8756) * Generate API docs with vuepress-plugin-typedoc * Links, fixes, cleanup * Convert bar samples to Vuepress * Some line chart samples moved over * Fix lint issues * Derived axis type sample * LineAreaStacked chart created in vuepress * added radar area axample * Line dataset added sample * final area example added * Add derived-chart-type * Bar scriptable sample * Scriptable samples * Clean lint errors * added linear axis samples to vuepress * change tab to spaces to fix lint error * Convert the rest of the scale samples * Scale option samples * Fix typo * Fixes * Legend samples * Title samples * Change the title of the tip block to Note (#8758) * Convert bar samples to Vuepress * Some line chart samples moved over * Fix lint issues * Derived axis type sample * LineAreaStacked chart created in vuepress * added radar area axample * Line dataset added sample * final area example added * Add derived-chart-type * Bar scriptable sample * Scriptable samples * Clean lint errors * added linear axis samples to vuepress * change tab to spaces to fix lint error * Convert the rest of the scale samples * Scale option samples * Fix typo * Fixes * Legend samples * Advanced samples * Remove extra section * Animation samples * Hide legend from progressive line * Add a comment on what `from` does * Tooltip samples * Ädd other charts to vuepress samples * enable plugin again since all samples have been converted * fix skip radar example, middle skip was not calculated correctly * lint error * Progressive-line: add 2nd line * Fix lint errors Co-authored-by: Jukka Kurkela <jukka.kurkela@gmail.com> Co-authored-by: Jacco van den Berg <jaccoberg2281@gmail.com> Co-authored-by: Jacco van den Berg <39033624+LeeLenaleee@users.noreply.github.com>
2021-04-02 14:04:39 +02:00
'area/line-stacked',
'area/radar'
]
},
{
title: 'Scales',
children: [
'scales/linear-min-max',
'scales/linear-min-max-suggested',
'scales/linear-step-size',
'scales/log',
'scales/time-line',
'scales/time-max-span',
'scales/time-combo',
]
},
{
title: 'Scale Options',
children: [
'scale-options/grid',
'scale-options/ticks',
'scale-options/titles',
'scale-options/center'
]
},
{
title: 'Legend',
children: [
'legend/position',
'legend/title',
'legend/point-style',
'legend/events',
2021-04-03 22:10:39 +02:00
'legend/html',
Vuepress samples (#8756) * Generate API docs with vuepress-plugin-typedoc * Links, fixes, cleanup * Convert bar samples to Vuepress * Some line chart samples moved over * Fix lint issues * Derived axis type sample * LineAreaStacked chart created in vuepress * added radar area axample * Line dataset added sample * final area example added * Add derived-chart-type * Bar scriptable sample * Scriptable samples * Clean lint errors * added linear axis samples to vuepress * change tab to spaces to fix lint error * Convert the rest of the scale samples * Scale option samples * Fix typo * Fixes * Legend samples * Title samples * Change the title of the tip block to Note (#8758) * Convert bar samples to Vuepress * Some line chart samples moved over * Fix lint issues * Derived axis type sample * LineAreaStacked chart created in vuepress * added radar area axample * Line dataset added sample * final area example added * Add derived-chart-type * Bar scriptable sample * Scriptable samples * Clean lint errors * added linear axis samples to vuepress * change tab to spaces to fix lint error * Convert the rest of the scale samples * Scale option samples * Fix typo * Fixes * Legend samples * Advanced samples * Remove extra section * Animation samples * Hide legend from progressive line * Add a comment on what `from` does * Tooltip samples * Ädd other charts to vuepress samples * enable plugin again since all samples have been converted * fix skip radar example, middle skip was not calculated correctly * lint error * Progressive-line: add 2nd line * Fix lint errors Co-authored-by: Jukka Kurkela <jukka.kurkela@gmail.com> Co-authored-by: Jacco van den Berg <jaccoberg2281@gmail.com> Co-authored-by: Jacco van den Berg <39033624+LeeLenaleee@users.noreply.github.com>
2021-04-02 14:04:39 +02:00
]
},
{
title: 'Title',
children: [
'title/alignment',
]
},
{
title: 'Tooltip',
children: [
'tooltip/position',
'tooltip/interactions',
'tooltip/point-style',
'tooltip/content',
'tooltip/html',
]
},
{
title: 'Scriptable Options',
children: [
'scriptable/bar',
'scriptable/bubble',
'scriptable/pie',
'scriptable/line',
'scriptable/polar',
'scriptable/radar',
]
},
{
title: 'Animations',
children: [
'animations/delay',
'animations/drop',
'animations/loop',
'animations/progressive-line',
]
},
{
title: 'Advanced',
children: [
'advanced/data-decimation',
Vuepress samples (#8756) * Generate API docs with vuepress-plugin-typedoc * Links, fixes, cleanup * Convert bar samples to Vuepress * Some line chart samples moved over * Fix lint issues * Derived axis type sample * LineAreaStacked chart created in vuepress * added radar area axample * Line dataset added sample * final area example added * Add derived-chart-type * Bar scriptable sample * Scriptable samples * Clean lint errors * added linear axis samples to vuepress * change tab to spaces to fix lint error * Convert the rest of the scale samples * Scale option samples * Fix typo * Fixes * Legend samples * Title samples * Change the title of the tip block to Note (#8758) * Convert bar samples to Vuepress * Some line chart samples moved over * Fix lint issues * Derived axis type sample * LineAreaStacked chart created in vuepress * added radar area axample * Line dataset added sample * final area example added * Add derived-chart-type * Bar scriptable sample * Scriptable samples * Clean lint errors * added linear axis samples to vuepress * change tab to spaces to fix lint error * Convert the rest of the scale samples * Scale option samples * Fix typo * Fixes * Legend samples * Advanced samples * Remove extra section * Animation samples * Hide legend from progressive line * Add a comment on what `from` does * Tooltip samples * Ädd other charts to vuepress samples * enable plugin again since all samples have been converted * fix skip radar example, middle skip was not calculated correctly * lint error * Progressive-line: add 2nd line * Fix lint errors Co-authored-by: Jukka Kurkela <jukka.kurkela@gmail.com> Co-authored-by: Jacco van den Berg <jaccoberg2281@gmail.com> Co-authored-by: Jacco van den Berg <39033624+LeeLenaleee@users.noreply.github.com>
2021-04-02 14:04:39 +02:00
'advanced/progress-bar',
'advanced/radial-gradient',
'advanced/linear-gradient',
'advanced/programmatic-events',
'advanced/derived-axis-type',
'advanced/derived-chart-type',
]
},
],
'/': [
'',
{
title: 'Getting Started',
children: [
'getting-started/',
'getting-started/installation',
'getting-started/integration',
'getting-started/usage',
'getting-started/v3-migration'
]
},
{
title: 'General',
children: [
'general/data-structures',
'general/accessibility',
'general/options',
'general/colors',
'general/fonts',
'general/padding',
'general/performance'
]
},
{
title: 'Configuration',
children: [
'configuration/',
'configuration/responsive',
'configuration/device-pixel-ratio',
'configuration/locale',
'configuration/interactions',
'configuration/canvas-background',
'configuration/animations',
'configuration/layout',
'configuration/legend',
'configuration/title',
'configuration/tooltip',
'configuration/elements',
'configuration/decimation'
]
},
{
title: 'Chart Types',
children: [
'charts/line',
'charts/bar',
'charts/radar',
'charts/doughnut',
'charts/polar',
'charts/bubble',
'charts/scatter',
'charts/area',
'charts/mixed'
]
},
{
title: 'Axes',
children: [
'axes/',
{
title: 'Cartesian',
children: [
'axes/cartesian/',
'axes/cartesian/category',
'axes/cartesian/linear',
'axes/cartesian/logarithmic',
'axes/cartesian/time',
'axes/cartesian/timeseries'
],
},
{
title: 'Radial',
children: [
'axes/radial/linear'
],
},
'axes/labelling',
'axes/styling'
]
},
{
title: 'Developers',
children: [
'developers/',
'developers/api',
['api/', 'TypeDoc'],
'developers/updates',
'developers/plugins',
'developers/charts',
'developers/axes',
'developers/contributing',
'developers/publishing'
]
},
],
}
}
};