Tooltip z-index issue

Expected Behavior

Tooltip should be over centered text.

Current Behavior

2020-01-10 15_26_34-profit _ Upsellon

Steps to Reproduce (for bugs)

animation: {
	duration: 500,
	onProgress: function (animation) {
	  var chartContext = this.chart.canvas.getContext('2d', {alpha: false})
	  chartContext.fillStyle = '#4a4a4a'
	  chartContext.font = '100 36px Rubik'
	  chartContext.textBaseline = 'middle'
	  chartContext.fillText(Math.round(this.data.datasets[0].data[0]) + '%%', this.chart.width / 2 - 30, this.chart.height / 2, 200)
	},
	onComplete: function (animation) {
	  var chartContext = this.chart.canvas.getContext('2d', {alpha: false})
	  chartContext.fillStyle = '#4a4a4a'
	  chartContext.font = '100 36px Rubik'
	  chartContext.textBaseline = 'middle'
	  chartContext.fillText(Math.round(this.data.datasets[0].data[0]) + '%%', this.chart.width / 2 - 30, this.chart.height / 2, 200)
	}
}

Environment

  • Chart.js version: 2.9.1
  • Browser name and version: 79.0.3945.88 (Official Build) (64-bit)

Author: Fantashit

1 thought on “Tooltip z-index issue

Comments are closed.