I'm trying to make custom tooltips for Chart.js (v3.0), however, when I console.log the context of the function it says:
TypeError: Converting circular structure to JSON
Is there a way to log this, so I can see the available data??
Code Example:
            plugins: {
                legend: {
                    display: false
                },
                maintainAspectRatio: false,
                responsive: true,
                tooltip: {
                    callbacks: {
                        label: function(context) {
                            let label = new Intl.NumberFormat('en-US', {style: 'percent', minimumFractionDigits: 0, maximumFractionDigits: 0}).format(context.parsed.y);
                            return label;
                        },
                        title: function(context) {
                            console.log("the context: "+JSON.stringify(context))
                            let title = context[0].label;
                            return title;
                        }
                    },
                    displayColors: false
                }
            }
Any help is appreciated.
 
    