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

Hide data for type scatter does not work #2609

Closed
leobr29 opened this issue Mar 25, 2022 · 1 comment
Closed

Hide data for type scatter does not work #2609

leobr29 opened this issue Mar 25, 2022 · 1 comment
Assignees
Labels

Comments

@leobr29
Copy link

leobr29 commented Mar 25, 2022

Hi everyone and thanks for this great library.

Description

It seems that we cannot hide scatter data. The legend state seems to be hidden and tooltips do not open but the point are still drawn.

Steps to check or reproduce

To reproduce it, I use next example by adding hide: true.
https://naver.github.io/billboard.js/demo/#LineChartOptions.LinePoint

exact code :

var chart = bb.generate({
  data: {
    columns: [
	["data1", 30, 200, 100, 400, 150, 250],
	["data2", 50, 20, 10, 40, 15, 25],
	["data3", 170, 250, 210, 190, 175, 225],
	["data4", 283, 170, 275, 143, 220, 255]
    ],
    hide: true,
    type: "line", // for ESM specify as: line()
    types: {
      data2: "scatter", // for ESM specify as: scatter()
    }
  },
  line: {
    point: [
      "data1",
      "data3"
    ]
  },
  bindto: "#linePoint"
});

King regards,
Leo.

@netil netil added the bug label Mar 28, 2022
@netil netil self-assigned this Mar 28, 2022
@netil
Copy link
Member

netil commented Mar 28, 2022

Hi @leobr29, confirmed the issue. Thanks for the report!
I'll dig into.

netil added a commit to netil/billboard.js that referenced this issue Mar 28, 2022
Make bubble/scatter type circle to be initialized with opacity=0,
and then handle the opacity at the initialization according dataset's
visibility option.

Ref naver#2609
@netil netil closed this as completed in 64ae74b Mar 28, 2022
github-actions bot pushed a commit that referenced this issue Mar 31, 2022
# [3.4.0](3.3.3...3.4.0) (2022-03-31)

### Bug Fixes

* **api:** Fix flow on indexed/category axis type ([4aba436](4aba436)), closes [#2595](#2595)
* **axis:** Fix culling visibility on dynamic loading ([4c79daf](4c79daf)), closes [#2582](#2582)
* **axis:** fix hidden axis rescale on dynamic load ([5418853](5418853)), closes [#2523](#2523) [#2571](#2571)
* **generator:** Prevent possible infinite loop when tab isn't visible ([bafdb17](bafdb17)), closes [#2606](#2606)
* **option:** Fix data.hide not working for bubble/scatter type ([64ae74b](64ae74b)), closes [#2609](#2609)
* **util:** Check if agent has mouse ([d42adaa](d42adaa)), closes [#2550](#2550) [#2585](#2585)
* **util:** Enhance parsing date string ([8d9f422](8d9f422)), closes [#1714](#1714)

### Features

* **api:** Implement axis range reset ([6c9d99e](6c9d99e)), closes [#2398](#2398)
* **option:** Intent to ship onclick ([63c5a53](63c5a53)), closes [#2587](#2587)
* **polar:** Intent to ship polar type ([feca715](feca715)), closes [#2462](#2462)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants