dc.js icon indicating copy to clipboard operation
dc.js copied to clipboard

xyTipsOn for LineChart

Open kum-deepak opened this issue 4 years ago • 2 comments

The document (http://dc-js.github.io/dc.js/docs/html/LineChart.html#xyTipsOn__anchor) suggests that xyTipsOn has no effect if brush in on. The document also suggests that it is boolean.

However, the code supports a special value 'always'

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

@gordonwoodhull is it worth supporting that special value?

kum-deepak avatar Jul 21 '20 16:07 kum-deepak

Yes, it is. As with almost every feature, it is there because people use it.

I agree this is hacky interface for the feature, and if I were to do it again, I probably wouldn't do it this way.

The discussion is in #1152

gordonwoodhull avatar Jul 21 '20 16:07 gordonwoodhull

What is the way you would have done if doing afresh:

  • three strings - 'always', 'never', 'default' (or, 'smart')
  • Typescript Enum (which gets exposed as a class)
  • Any other

We can decide and then implement it in other similar situations as well. We will maintain backward compatibility in compat layer.

kum-deepak avatar Jul 25 '20 09:07 kum-deepak