-
Notifications
You must be signed in to change notification settings - Fork 359
Enable centered label drawing for doughnut controllers #825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 41 commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
050d45e
Enable centered label drawing for doughnut controllers
stockiNail bffc452
InnerLabel uses the label annotation
stockiNail 00fa4ee
moves code in afterUpdate hook
stockiNail 93e4816
adds listeners to events
stockiNail a2001f1
changes context type for innerlabel
stockiNail 5fb097d
moves to a specific element for doughnut inner label
stockiNail 0fa5b9e
removes specific context type for innerlabel
stockiNail 6cbbf43
fixes returned properties when there is not any doughnut controller
stockiNail b215785
removes inner label plugin and all managed by annotaiton one
stockiNail 33be0fe
adds js doc and fix some CC issues
stockiNail 408de06
improves controller retriever
stockiNail 5181eb7
creates helpers.callout
stockiNail 2699fb6
fixes visibility check on elements
stockiNail a6a76cc
test cases
stockiNail 7e214a7
improves filter on array and more tests
stockiNail 6bc3477
types def
stockiNail dcf09b6
add documentation
stockiNail 102b1c9
fix lint
stockiNail 1e1f0f0
add samples
stockiNail 4c67805
fixes animations and options
stockiNail 21b9e13
no extension from label and background not a box but arc
stockiNail 4eade88
aply some reviews
stockiNail fb32684
lint
stockiNail 7b92d98
fixes test cases
stockiNail 2332455
fixes color animation
stockiNail 9817696
fixes font and colors options as indexable
stockiNail 89e2458
adds new test cases for background
stockiNail fe411e9
fixes types
stockiNail 87f2e07
fixes docs and samples
stockiNail 829ff30
CC and color animations
stockiNail 198d964
change doc about animations
stockiNail a82ede0
Merge remote-tracking branch 'origin/master' into innerLabelProto
stockiNail cec5196
Merge remote-tracking branch 'origin/master' into innerLabelProto
stockiNail b468ef6
apply new features coming from other PRs after merging
stockiNail 4bb7ecd
adds test cases for init animation
stockiNail b2cc907
apply review
stockiNail a359625
Merge remote-tracking branch 'origin/master' into innerLabelProto
stockiNail 91ff42d
Merge remote-tracking branch 'origin/master' into innerLabelProto
stockiNail 4d592cd
fix lineHeight on multiple font when size must be updated by fit ratio
stockiNail 1701b84
Merge branch 'master' into innerLabelProto
stockiNail 26a5ca1
add hitTolerance
stockiNail a51cf39
apply review
stockiNail File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,243 @@ | ||
const path = require('path'); | ||
const docsVersion = "VERSION"; | ||
const base = process.env.NODE_ENV === "development" ? '/chartjs-plugin-annotation/master/' : `/chartjs-plugin-annotation/${docsVersion}/`; | ||
|
||
module.exports = { | ||
dest: 'dist/docs', | ||
title: 'chartjs-plugin-annotation', | ||
description: 'Annotations for Chart.js', | ||
theme: 'chartjs', | ||
base, | ||
head: [ | ||
['link', {rel: 'icon', href: '/favicon.png'}], | ||
], | ||
plugins: [ | ||
['flexsearch'], | ||
['redirect', { | ||
redirectors: [ | ||
// Default sample page when accessing /samples. | ||
{base: '/samples', alternative: ['intro']}, | ||
], | ||
}], | ||
[ | ||
'vuepress-plugin-typedoc', | ||
{ | ||
entryPoints: ['../../types/index.d.ts'], | ||
hideInPageTOC: true, | ||
tsconfig: 'tsconfig.json', | ||
sidebar: { | ||
fullNames: true, | ||
parentCategory: 'API', | ||
}, | ||
}, | ||
], | ||
['@simonbrunel/vuepress-plugin-versions', { | ||
filters: { | ||
suffix: (tag) => tag ? ` (${tag})` : '', | ||
title: (v, vars) => window.location.href.includes('master') ? 'Development (master)' : v + (vars.tag ? ` (${tag})` : ''), | ||
}, | ||
menu: { | ||
text: '{{version|title}}', | ||
items: [ | ||
{ | ||
text: 'Documentation', | ||
items: [ | ||
{ | ||
text: 'Development (master)', | ||
link: '/chartjs-plugin-annotation/master/', | ||
target: '_self', | ||
}, | ||
{ | ||
type: 'versions', | ||
text: '{{version}}{{tag|suffix}}', | ||
link: '/chartjs-plugin-annotation/{{version}}/', | ||
exclude: /^[0]\.[0-4]\./, | ||
group: 'minor', | ||
target: '_self', | ||
} | ||
] | ||
}, | ||
{ | ||
text: 'Release notes (5 latest)', | ||
items: [ | ||
{ | ||
type: 'versions', | ||
limit: 5, | ||
target: '_blank', | ||
group: 'patch', | ||
link: 'https://github.com/chartjs/chartjs-plugin-annotation/releases/tag/v{{version}}' | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
}], | ||
], | ||
chainWebpack(config) { | ||
config.module | ||
.rule('chart.js') | ||
.include.add(path.resolve('node_modules/chart.js')).end() | ||
.use('babel-loader') | ||
.loader('babel-loader') | ||
.options({ | ||
presets: ['@babel/preset-env'] | ||
}) | ||
.end(); | ||
}, | ||
markdown: { | ||
extendMarkdown: md => { | ||
md.use(require('markdown-it-include'), path.resolve(__dirname, '../')); | ||
} | ||
}, | ||
themeConfig: { | ||
repo: 'chartjs/chartjs-plugin-annotation', | ||
logo: '/favicon.png', | ||
lastUpdated: 'Last Updated', | ||
searchPlaceholder: 'Search...', | ||
editLinks: true, | ||
docsDir: 'docs', | ||
chart: { | ||
imports: [ | ||
['scripts/register.js'], | ||
['scripts/defaults.js'], | ||
['scripts/utils.js', 'Utils'], | ||
] | ||
}, | ||
nav: [ | ||
{text: 'Home', link: '/'}, | ||
{text: 'API', link: '/api/'}, | ||
{text: 'Guide', link: '/guide/'}, | ||
{text: 'Samples', link: '/samples/'}, | ||
], | ||
sidebar: { | ||
'/api/': { | ||
title: 'API' | ||
}, | ||
'/guide/': [ | ||
'', | ||
'integration', | ||
'usage', | ||
'options', | ||
'configuration', | ||
{ | ||
title: 'Annotations', | ||
collapsable: false, | ||
children: [ | ||
'types/box', | ||
'types/ellipse', | ||
'types/label', | ||
'types/line', | ||
'types/point', | ||
'types/polygon', | ||
'types/doughnutLabel' | ||
] | ||
}, | ||
'migrationV1', | ||
'migrationV2' | ||
], | ||
'/samples/': [ | ||
'intro', | ||
{ | ||
title: 'Box annotations', | ||
children: [ | ||
'box/basic', | ||
'box/quarters', | ||
'box/disclosure', | ||
'box/canvas', | ||
'box/image', | ||
'box/initAnim', | ||
'box/gradient', | ||
] | ||
}, | ||
{ | ||
title: 'Ellipse annotations', | ||
children: [ | ||
'ellipse/basic', | ||
'ellipse/rotation', | ||
'ellipse/label', | ||
'ellipse/image', | ||
] | ||
}, | ||
{ | ||
title: 'Label annotations', | ||
children: [ | ||
'label/basic', | ||
'label/point', | ||
'label/callout', | ||
'label/canvas', | ||
'label/image', | ||
'label/innerChart', | ||
'label/lowerUpper', | ||
'label/fontsColors', | ||
'label/autoscaling' | ||
] | ||
}, | ||
{ | ||
title: 'Line annotations', | ||
children: [ | ||
'line/basic', | ||
'line/curve', | ||
'line/lowerUpper', | ||
'line/limited', | ||
'line/average', | ||
'line/standardDeviation', | ||
'line/callout', | ||
'line/visibility', | ||
'line/labelVisibility', | ||
'line/canvas', | ||
'line/image', | ||
'line/datasetBars', | ||
'line/animation', | ||
'line/hook', | ||
] | ||
}, | ||
{ | ||
title: 'Point annotations', | ||
children: [ | ||
'point/basic', | ||
'point/combined', | ||
'point/outsideChartArea', | ||
'point/shadow', | ||
'point/initAnim', | ||
] | ||
}, | ||
{ | ||
title: 'Polygon annotations', | ||
children: [ | ||
'polygon/basic', | ||
'polygon/stop', | ||
'polygon/outsideChartArea', | ||
'polygon/shadow', | ||
] | ||
}, | ||
{ | ||
title: 'Doughnut label annotations', | ||
children: [ | ||
'doughnutLabel/basic', | ||
'doughnutLabel/canvas', | ||
'doughnutLabel/image', | ||
'doughnutLabel/gauge', | ||
'doughnutLabel/background', | ||
] | ||
}, | ||
{ | ||
title: 'Charts', | ||
children: [ | ||
'charts/bar', | ||
'charts/line', | ||
], | ||
}, | ||
{ | ||
title: 'Interaction', | ||
children: [ | ||
'interaction/interaction', | ||
'interaction/dragging', | ||
'interaction/selection', | ||
'interaction/cartesianplane', | ||
], | ||
}, | ||
'utils', | ||
] | ||
} | ||
} | ||
}; |
This file contains hidden or 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
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
<mxfile host="Electron" modified="2023-01-04T15:27:51.065Z" agent="5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/20.6.2 Chrome/106.0.5249.199 Electron/21.3.3 Safari/537.36" etag="UwpRt7ZZ2I8QNyQM25Nf" version="20.6.2" type="device"><diagram id="EVLCtf8sz0nmjKRDlPg8" name="Page-1">7ZfZjpswFIafhstUYLMkl4VZoqqVKkXVtFeVJzhg1XCocRqSp68NJonjjKaVMotGw03w7+Pt+31s4uGs6m4FacovkFPuIT/vPHzlIRT401j9aGU7KNNgOgiFYLkJOggLtqNjS6OuWU5bK1ACcMkaW1xCXdOltDQiBGzssBVwe9SGFNQRFkvCXfWO5bI0q0DJQZ9TVpTjyEE8G2oqMgablbQlyWFzJOFrD2cCQA5vVZdRruGNXIZ2Nw/U7icmaC3/pUF6t5vHP3dh1szR76+Lifz86dvE9PKH8LVZsJms3I4EBKzrnOpOfA+nm5JJumjIUtdulOdKK2XFVSlQr+6kxhGokLQ7kswkbylUVIqtCjG1yDfAzI5BoSlvDvxxbLTyiP2+ITGeF/u+D1jUiyHzH5TQ45RUL2pL0scJkbYZ9umKdZpqumKcZ8BB9B3h4bkMSpwkHyILJsZ75Qhn5MKMnggldlB2Hsq2Dk+1QmmDE7RlO3LfB+idSNYS2uG86LlyVtTqfalwUcUy1ZiYSuSPpqJiea4bpw2wWvbrilIvujqxoIZaB7VSwC96ItqpsIJamgMLhbqJ8pzVRQpSQqXE8DImBslJPvhuPkRn0iF8qmwIHQsH5t+Vkfok7gs/3h19+ISbnTg6O5eUwew5TY3cvEQ6Md2T7t3H0ccI2z6GZ26q5DlNjB0Th5m8GgvV/XbTP6/KRxzal+T+k+2lfEwcH82wb9lIAZJIBnoSk5l/obsztjMUn3F2ehlnVfHwLd/XHf0jwtd/AQ==</diagram></mxfile> |
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.