Skip to content

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

@sgratzl

Description

@sgratzl

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions