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

Only the last background color shows up in the line chart #3888

Closed
raul1991 opened this issue Feb 9, 2017 · 1 comment
Closed

Only the last background color shows up in the line chart #3888

raul1991 opened this issue Feb 9, 2017 · 1 comment

Comments

@raul1991
Copy link

raul1991 commented Feb 9, 2017

Expected Behavior

I expected all the colors but seems as if the last color gets shown and others are hidden behind it.

Current Behavior

Only the last dataset's background color is shown
image

The black markers above point to the different colors for the datasets yet only the last one(shown at the top) is being shown.

Possible Solution

Steps to Reproduce (for bugs)

My color object looks like this

'graphConfiguration': {
			'colors': {
				'tpgs': ["#CA9BC1", "#EE7A75", "#99A9BF", "#66A19F", "#CA9BC1", "#EE7A75"]
			}
		}

I fill the background color on the fly using js like this
lineChartData['datasets'][i].backgroundColor = graphConfiguration.colors.tpgs[i];

Context

Environment

  • Chart.js version: 2.3.0
  • Browser name and version: chrome, 56.0.2924.87
  • Link to your project:
@etimberg
Copy link
Member

etimberg commented Feb 9, 2017

Closing as duplicate of #2719

@etimberg etimberg closed this as completed Feb 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants