question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fill does not work after first dataset

See original GitHub issue

Expected Behavior

Just trying to do a simple fill in my line chart. The first dataset works, the the next two do not fill.

Current Behavior

Only the first dataset fills

Environment

  • Chart.js version: 2.9.3
  • Browser name and version: Chrome latest
  • Link to your project:
<script>
            var config = {
			type: 'line',
			data: {
				labels: ".json_encode($results->dates).",
				datasets: [{
					label: 'Confirmed',				
					backgroundColor: '".get_option('bpc_covid_confirmed_color')."',
					borderColor: '".get_option('bpc_covid_confirmed_color')."',
					data: ".json_encode($results->confirmed).",
					fill: true,
				}, {
					label: 'New Cases',					
					backgroundColor: '".get_option('bpc_covid_new_color')."',
					borderColor: '".get_option('bpc_covid_new_color')."',
					data: ".json_encode($results->new).",
					fill: true,
				}, {
					label: 'Deaths',					
					backgroundColor: '".get_option('bpc_covid_deaths_color')."',
					borderColor: '".get_option('bpc_covid_deaths_color')."',
					data: ".json_encode($results->deaths).",
					fill: true,
				}]
			},
			options: {
			    maintainAspectRatio: false,
				responsive: true,
				title: {
					display: false,
					text: 'Maine Covid-19 Cases'
				},
				tooltips: {
					mode: 'index',
					intersect: false,
				},
				hover: {
					mode: 'nearest',
					intersect: true
				},
				scales: {
					xAxes: [{
						display: true,
						ticks: {
                    autoSkip: false,
                    maxRotation: 45,
                    minRotation: 45
                },
						scaleLabel: {
							display: true,
							labelString: 'Date'
						}
					}],
					yAxes: [{
						display: true,
						scaleLabel: {
							display: true,
							labelString: 'Confirmed'
						}
					}]
				}
			}
		};
		window.onload = function() {
			var ctx = document.getElementById('canvas').getContext('2d');
			window.myLine = new Chart(ctx, config);
		};
		//var colorNames = Object.keys(window.chartColors);
		</script>

Untitled

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
benmccanncommented, Mar 18, 2020

You maybe could also try setting the datasets at 50% transparency or something like that if you want to see the ones behind

0reactions
rpelletierrefocuscommented, Mar 27, 2020

Yes, sorry for the late replay, I got it wokring.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# adapter.fill dataset not working with stored procedure even ...
I would use using for the connection, command and dataadapter. There could be some static code removing/emptying the dataset or showing it ...
Read more >
Fill data automatically in worksheet cells - Microsoft Support
Automatically fill a series of data in your worksheet, like dates, numbers, text, and formulas. Use the AutoComplete feature, Auto Fill Options button...
Read more >
How to fill in missing data in Dataset in place
I have a dummy dataset that contains a few missing values and some filler strings. The missing values have been entered as a...
Read more >
Merge with Caution: How to Avoid Common Problems ... - SAS
Note that the datasets are first sorted on the common variable. ITEMCODE prior to the merge: proc sort data=products; by itemcode; run;.
Read more >
Use Smart Fill in Sheets to automate data entry - Google Support
You can use Smart Fill for tasks like extracting the first name from a given list of full names ... On your computer,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found