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

ChartJS - tooltip shows on the label #6931

Closed
narsapr opened this issue Jan 7, 2020 · 2 comments · Fixed by #6943
Closed

ChartJS - tooltip shows on the label #6931

narsapr opened this issue Jan 7, 2020 · 2 comments · Fixed by #6943

Comments

@narsapr
Copy link

narsapr commented Jan 7, 2020

Don't want to show tooltip on the label.

I want to hide the tooltip when hover over on the label.

Please check on the image here.

2020-01-07 17_10_59-Bar Chart - Internet Explorer

<title>Bar Chart</title>
<script src="https://www.chartjs.org/dist/2.9.3/Chart.min.js"></script>
<script>

	var color = Chart.helpers.color;
	var barChartData = {
		labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
		datasets: [{
			label: 'Dataset 1',
			backgroundColor: 'green',
			borderColor: 'green',
			borderWidth: 1,
			data: [1000, 2000, 3000, 4000, 5000, 6000, 7500,

			]
		}, {
			label: 'Dataset 2',
			type: 'line',
			fill: false,
			backgroundColor: 'red',
			borderColor: 'red',
			borderWidth: 2,
			data: [1060, 2110, 3098, 4010, 4020, 5010, 3030,

			]
		}]

	};

	window.onload = function() {
		var ctx = document.getElementById('canvas').getContext('2d');
		window.myBar = new Chart(ctx, {
			type: 'bar',
			data: barChartData,
			options: {
				responsive: true,
				legend: {
					position: 'bottom',
				},
				title: {
					display: true,
					text: 'Chart.js Bar Chart'
									}
			}
		});

	};

</script>
@etimberg
Copy link
Member

etimberg commented Jan 7, 2020

@n8899 do you have a fiddle that reproduces this? I tried in this sample and I could not reproduce it in Firefox.

@kurkle
Copy link
Member

kurkle commented Jan 9, 2020

From the image, #6914 and/or #6889 changes this behavior.
The scale starts at 1000 while bars start from 0. The hidden portion is intersected below chartArea.

Further, I think we should test if the pointer is in chartArea when finding active items.

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