dc-js / dc.js

Multi-Dimensional charting built to work natively with crossfilter rendered with d3.js
Apache License 2.0
7.42k stars 1.81k forks source link

Line chart can't renderData point and Brush at same time #1861

Closed fabienMv closed 2 years ago

fabienMv commented 2 years ago

If you doesn't desactivate Brush on a Line Chart , data point aren't rendered.

tested with dc.js v 4.2.7 and d3 version 7.1.1 and crossfilter v1.5.4

exemple here : https://jsfiddle.net/tbha0ngp/

kum-deepak commented 2 years ago

I checked the code. Before drawing dots it checks if there is a brush:

https://github.com/dc-js/dc.js/blob/develop/src/charts/line-chart.js#L353

The dots implementation relies on mouse move events to change sizes, opacity, and show xyTips. These will not work with the brush on which also uses mouse events.

Having said that probably dots can show, even with the brush on with an understanding that size, opacity change, and xyTips will not work.

kum-deepak commented 2 years ago

There is an easy way to override the default behavior, please add

.xyTipsOn('always')
fabienMv commented 2 years ago

thanks for the tricks which works for me (Having data point visible with no reaction to mouse events )