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

v3: (partially) derive dataElementOptions from element default options #7408

Closed
sgratzl opened this issue May 23, 2020 · 2 comments
Closed

Comments

@sgratzl
Copy link
Contributor

sgratzl commented May 23, 2020

Feature Proposal

partially derive the dataElementOptions and datasetElementOptions from the defaults options for an element.

e.g.

defaults.set('elements', {
	rectangle: {
		backgroundColor: defaultColor,
		borderColor: defaultColor,
		borderSkipped: 'bottom',
		borderWidth: 0
	}
});

BarController.prototype.dataElementOptions = [
		'backgroundColor',
		'borderColor',
		'borderSkipped',
		'borderWidth',
		'barPercentage',
		'barThickness',
		'categoryPercentage',
		'maxBarThickness',
		'minBarLength'
	];;

The first four options could be automatically derived from the default options (its keys).

Feature Use Case

avoid code duplication and easier to extend

@benmccann
Copy link
Contributor

I wonder if we might have to fix #5233 first

@kurkle
Copy link
Member

kurkle commented Mar 17, 2021

Closed by #8374

@kurkle kurkle closed this as completed Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants