How can I use charts in my query reports

I am now on version 9.2.18, please if anyone can help on this issue
I need to make a query report with chart, I was able to do it before in previous versions but I think new changes in frappe in the charts.

Please help.

1 Like

Try this idea Custom report chart broken

Found it
It have been changed to this:

get_chart_data: function(columns, result) {
		return {
			data: {
				labels: result.map(d => d[0]),
				datasets: [{
					title: 'Project Stock Status',
					values: result.map(d => d[1])
				}]
			},
			type: 'bar',
			format_tooltip_x: d => (d + '').toUpperCase(),
			format_tooltip_y: d => d + ' pts'
		}
	}

After changing it works fine but still the tooltip not working, don’t know why ??

3 Likes

@hfarid please contribute these reports via PR if they are standard!

@rmehta What is PR ??

Pull Request

1 Like

@JoEz Thank you

I got lost because we know a lot PR abbreviations.

Hope you will start sending them now :slight_smile:

1 Like

@rmehta This report is not standard, but soon we will be finishing some standard reports and will share them.

I am trying to learn the PR to share our things.