Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lineChart.renderDataPoints(false) doesnt disable point rendering #782

Open
stevemandl opened this issue Dec 4, 2014 · 2 comments
Open
Milestone

Comments

@stevemandl
Copy link

The comments state:
If options is falsy, it disables data point rendering.
This is not happening; drawDots() will always render the data points as long as brushing is not enabled. Here is my proposed solution - A minor change to the beginning of drawDots seems to fix the problem:

function drawDots(chartBody, layers) {
    if (!_chart.brushOn() && _dataPointRadius) { 

instead of

function drawDots(chartBody, layers) {
    if (!_chart.brushOn()) { 

...

@sclevine
Copy link
Member

sclevine commented Dec 5, 2014

Setting .renderDataPoints(false) will disable rendering each data point on the chart by setting:

_dataPointFillOpacity = DEFAULT_DOT_OPACITY;
_dataPointStrokeOpacity = DEFAULT_DOT_OPACITY;

where

var DEFAULT_DOT_OPACITY = 1e-6;

This results in invisible dots that are made visible on hover events. Changing the drawDots conditional to !_chart.brushOn() && _dataPointRadius breaks the dot rendering on those hover events. #renderDataPoints() is only intended to control whether or not the data points appear at all times.

I do agree that the current implementation is confusing, and we would certainly consider accepting a pull request to clear this up :)

@gordonwoodhull
Copy link
Contributor

If the request is to not show the dots even on hover, #735 should cover that. I agree the name is kind of confusing.

@gordonwoodhull gordonwoodhull modified the milestone: v2.0 Dec 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants