question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tooltip Trigger Radius and Logarithmic x-axle labels

See original GitHub issue

Notice for Issue labels: Version Charts.js 2-Beta2

Hey guys,

i’m using a Scatter-Chart as Bar-Chart because we need logarithmic on x-Axle. thats working already fine!

1) Tooltip Trigger Yes, sure. Its still a scatter and the dots trigger the tooltips. But i found in examples and docs two-three things they may can help me but i dont know the position which i have to set these options.

  1. from samples/line-customTooltips.html Chart.defaults.global.pointHitDetectionRadius = 1000;
  2. from http://nnnick.github.io/Chart.js/docs-v2/
point.radius
point.hitRadius

My idear was to set a higher radius on the points (which we later set to opacity:0) to have an bigger trigger-radius for the tooltips. Maybe some have a better solution or can help me why did these parameters works? I have enable the points to show you the main-triggers.

Demo of Bar-Log-Chart

2) Logarithmic x-Axle Labels Question UPDATED notice: jsFiddle is not for this question!

I try to set min/max on the logarithmic x-Axle.

ticks: {
  min: 20,
  max: 20000,
 ...
}

It works not perfect. 20 on the start is working but the 20k label doesnt displayed. Next problem is that the first area stick on the y-Axle line. Here is an example: http://fs5.directupload.net/images/160225/mqpijnjr.png

Thanks in advance!

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
pleinxcommented, Feb 24, 2016

Okay for Question 1) i have now the correct position found 😉

new Chart.Scatter(ctx, { data: scatterChartData, options: { responsive: true, elements: { point: { radius: 100, hitRadius: 100 } },

elements: { ... } was the solution. I will play a little bit with these parameter. But if anyone have a better idear to realize this, please help me 😃

0reactions
pleinxcommented, Oct 24, 2016

@etimberg Thanks! i’ll test it 😃 Nice support!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Add More Information in the Tooltips in Chart JS
The canvas tag, javascript, arrays and Chart JS all need to be combined to draw an eye catching bar chart or line chart....
Read more >
How to create a custom HTML tooltip from scratch in Chart JS
The canvas tag, javascript, arrays and Chart JS all need to be combined to draw an eye catching bar chart or line chart....
Read more >
TinyMCE: The Most Advanced WYSIWYG HTML Editor ...
TinyMCE is the most advanced WYSIWYG HTML editor designed to simplify website content creation. The rich text editing platform that helped ...
Read more >
Frequently Asked Questions - BTAWiki
Vehicle pilots are marked with a (V) tag next to their pilot role (where it says Recruit, Outrider, Defender, etc). Mech pilots say...
Read more >
jQuery UI - Close Dialog When Clicked Outside - Stack Overflow
dialog('open'); }); // trigger .hint dialog with an anchor tag referencing the form element $('.hintclickicon').click(function(e) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found