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

hitRadius does not work for financial charts #101

Open
LongPeakBlue opened this issue Jul 5, 2021 · 0 comments
Open

hitRadius does not work for financial charts #101

LongPeakBlue opened this issue Jul 5, 2021 · 0 comments

Comments

@LongPeakBlue
Copy link

LongPeakBlue commented Jul 5, 2021

I am trying to use options.hitRadius to control the visibility of the OHLC candle tooltip popup, however it is not working.

fin

The documentation for hitRadius can be found at https://www.chartjs.org/docs/latest/configuration/elements.html#point-configuration. It is working fine for normal, non-financial chartjs charts. However when I try to use options.hitRadius for financial-chartjs, it does not work.

No matter where I place my mouse, how far away from the candlestick, the hitRadius does not seem to get taken into account, and a tooltip displaying the OHLC values is always showing when mousing over the chart.

Does anybody know how to control the hit radius for financial charts? Has anybody managed to control the tooltip hit radius for financial chartjs? Is it possible?

var ctx = document.getElementById('chart').getContext('2d');

var myChart = new Chart(ctx, {
    type: 'candlestick',
    data: {
        datasets: [{
            data: data
        }]
    },
    options: {
        hitRadius: 100
    }
});

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant