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

adds the possibility to define border styles for each data point from the series. works for bar, line, area, scatter, pie #1343

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kotlyarevskyy
Copy link

Adds a new 'styles' property to the OptsChartData interface to define styles for data points.
Adds logic that allows custom border styles to be defined for each data point in the following charts: Bar, Line, Area, Scatter, Pie/Doughnut charts.

the data array would look like this, e.g:

data: [
    {
	 name: 'Project Status',
	labels: ['Red', 'On Hold', 'Green', 'Unknown'],
	values: [10, 20, 38, 2]
	styles: [
		{border: {pt: 2, color: '#ff0000'}} // RED BORDER FOR THE FIRST DATA POINT
		{}
		{border: {pt: 2, color: '#00ff00'}} // GREEN BORDER FOR THE THIRD DATA POINT
		{}
	 ]
    }
]

… styles for data points. Adds logic that allows custom border styles to be defined for each data point in the following charts: Bar, Line, Area, Scatter, Pie/Doughnut charts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant