chartjs / chartjs/chartjs-chart-financial

hitRadius does not work for financial charts

Open
#101 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
809
Forks
199
PR merge metrics
No merged PRs in 30d

Description

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

![fin](https://user-images.githubusercontent.com/86268524/124403543-eda24180-dd2e-11eb-9466-6e0596fd06a4.png)

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.