chartjs-plugin-crosshair icon indicating copy to clipboard operation
chartjs-plugin-crosshair copied to clipboard

Dots on line charts don't appear on the vertical line

Open kadenBeckstead opened this issue 5 years ago • 9 comments

I followed all the steps to add this plugin and everything works great except for the little dot(s) that trace the graph and is fixed to the vertical line (in the demo they are little hollow circles). I've tried adjusting config options but cannot get them to appear. Anyone have any ideas? And if they do appear, is there any way to style them? Thanks!

kadenBeckstead avatar Aug 21 '19 19:08 kadenBeckstead

Did you enable the interpolate tooltip mode?

 tooltips: {
      mode: 'interpolate',
      intersect: false
    },

AbelHeinsbroek avatar Aug 21 '19 20:08 AbelHeinsbroek

Yes, here's a screenshot image

kadenBeckstead avatar Aug 21 '19 20:08 kadenBeckstead

Ah, I forgot that you also need to add

interpolate: true

To your dataset configuration image

AbelHeinsbroek avatar Aug 21 '19 20:08 AbelHeinsbroek

I added it like this, but doesn't seem to work, am I putting that in the wrong place? image

kadenBeckstead avatar Aug 21 '19 20:08 kadenBeckstead

You need to add it to your datasets:

options: {
...
  data: {
     datasets: [
       {color: ..., data:..., interpolate: true}
     ]
  }
...
}

AbelHeinsbroek avatar Aug 21 '19 20:08 AbelHeinsbroek

Weird, when I do it that way, the tooltips disappear and still no drag-dot. Any other ideas?

kadenBeckstead avatar Aug 21 '19 20:08 kadenBeckstead

For reference, I am using ng2 charts to create this graph (if that helps) https://valor-software.com/ng2-charts/#LineChart

kadenBeckstead avatar Aug 21 '19 20:08 kadenBeckstead

@kadenBeckstead - Were you able to fix your issue? I encountered the same problem with my graph.

jsaucedo294 avatar Mar 24 '22 17:03 jsaucedo294

@jsaucedo294 - Been a while, but as I recall, we went with a different charting solution. Sorry!

kadenBeckstead avatar Mar 24 '22 19:03 kadenBeckstead