Skip to content
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

Allow customized charts to participate in competitions fairly #636

Open
neoddish opened this issue Apr 5, 2023 · 0 comments
Open

Allow customized charts to participate in competitions fairly #636

neoddish opened this issue Apr 5, 2023 · 0 comments
Assignees
Labels
feat New feature or request

Comments

@neoddish
Copy link
Member

neoddish commented Apr 5, 2023

Currently, some standard rules' scores will take into account customized charts. e.g.

export const dataCheck: RuleModule = {
id: 'data-check',
type: 'HARD',
docs: {
lintText: 'Data must satisfy the data prerequisites.',
},
trigger: () => {
return true;
},

But some do not:

const applyChartTypes = ['pie_chart', 'donut_chart'];
export const diffPieSector: RuleModule = {
id: 'diff-pie-sector',
type: 'SOFT',
docs: {
lintText: 'The difference between sectors of a pie chart should be large enough.',
},
trigger: ({ chartType }) => {
return applyChartTypes.includes(chartType);
},

In v3.0, to make a custom chart participate in a scoring rule, you need to override this rule when instantiating Advisor. For example: https://ava.antv.antgroup.com/examples/advice/advise-and-lint/#custom-rules-ca

But this is very troublesome, a better solution should be provided in version 3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request
Projects
Status: Todo
Development

No branches or pull requests

3 participants