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

Scatter Plot points not displaying when loaded into chart in some cases #3740

Closed
jarrod-cummings opened this issue Apr 17, 2024 · 1 comment · May be fixed by gti-sos/SOS2324-21#87
Closed
Labels

Comments

@jarrod-cummings
Copy link

jarrod-cummings commented Apr 17, 2024

Description

I have a combination chart in which I am displaying data for several lines and a scatter plot, and the contents of the chart can be updated dynamically based on filtering from a user. I've been running into some odd behavior where if when the chart is initially generated there is no data loaded for the scatter plot, the points for the scatter plot will not display even if data is loaded in later. It looks like when this happens, the bb-charts-circles container where the scatter plot points would normally be does not exist. Here's a minimal example:

Steps to check or reproduce

var chart = bb.generate({
  data: {
    columns: [
	["data1", 30, 20, 50, 40, 60, 50],
	["data2"]
    ],
    type: "line", 
    types: {
      data2: "scatter", 
    },
  },
  bindto: "#scatterPlot"
});

setTimeout(function() {
	chart.load({
		columns: [
			["data2", 200, 130, 90, 240, 130, 220],
		]
	});
}, 3000);

Screenshot 2024-04-17 at 4 13 31 PM
Screenshot 2024-04-17 at 4 20 05 PM

If there is some data when the chart is first generated, then the scatter plot will display when loaded in



var chart = bb.generate({
  data: {
    columns: [
	["data1", 30, 20, 50, 40, 60, 50],
	["data2", 1]
    ],
    type: "line",
    types: {
      data2: "scatter",
    },
  },
  bindto: "#scatterPlot"
});

setTimeout(function() {
	chart.load({
		columns: [
			["data2", 200, 130, 90, 240, 130, 220],
		]
	});
}, 3000);

Screenshot 2024-04-17 at 4 16 52 PM
Screenshot 2024-04-17 at 4 19 31 PM

@netil
Copy link
Member

netil commented Apr 19, 2024

Hi @jarrod-cummings, confirmed the issue.
I'll look for it. Thanks!

netil pushed a commit to netil/billboard.js that referenced this issue Apr 22, 2024
- Fix circle selector, where mismatch detection of scatter/bubble type
- Rename isboolean -> isBoolean util function name
- Split event binding call for singleX and multipleX

Ref naver#3740
@netil netil closed this as completed in 413812d Apr 22, 2024
github-actions bot pushed a commit that referenced this issue May 21, 2024
# [3.12.0-next.2](3.12.0-next.1...3.12.0-next.2) (2024-05-21)

### Bug Fixes

* **api:** Fix scatter type loading ([413812d](413812d)), closes [#3740](#3740)
* **treemap:** Fix missing element arg on data.onover/out ([22428dc](22428dc)), closes [#3766](#3766)
* **types:** Correct typo in BarOptions ([a0ad93a](a0ad93a)), closes [#3749](#3749)

### Features

* **axis:** Intent to ship axis.x.forceAsSingle ([6ad0554](6ad0554)), closes [#3764](#3764)
* **funnel:** Intent to ship funnel type ([e4cdda1](e4cdda1)), closes [#3449](#3449)
github-actions bot pushed a commit that referenced this issue May 27, 2024
# [3.12.0](3.11.3...3.12.0) (2024-05-27)

### Bug Fixes

* **api:** Fix scatter type loading ([413812d](413812d)), closes [#3740](#3740)
* **treemap:** Fix missing element arg on data.onover/out ([22428dc](22428dc)), closes [#3766](#3766)
* **types:** Add missing arc.needle.value ([e0a30fe](e0a30fe)), closes [#3697](#3697)
* **types:** Add missing region.label option ([e03057c](e03057c)), closes [#3732](#3732)
* **types:** Correct typo in BarOptions ([a0ad93a](a0ad93a)), closes [#3749](#3749)

### Features

* **axis:** Intent to ship axis.tooltip ([54e77cb](54e77cb)), closes [#3603](#3603)
* **axis:** Intent to ship axis.x.forceAsSingle ([6ad0554](6ad0554)), closes [#3764](#3764)
* **bundler:** Migrate babel -> esbuild ([ff0a98c](ff0a98c)), closes [#3601](#3601)
* **funnel:** Intent to ship funnel type ([e4cdda1](e4cdda1)), closes [#3449](#3449)
github-actions bot pushed a commit that referenced this issue May 27, 2024
# [3.12.0](3.11.3...3.12.0) (2024-05-27)

### Bug Fixes

* **api:** Fix scatter type loading ([413812d](413812d)), closes [#3740](#3740)
* **treemap:** Fix generation w/non-exist node ([02987ab](02987ab)), closes [#3777](#3777)
* **treemap:** Fix missing element arg on data.onover/out ([22428dc](22428dc)), closes [#3766](#3766)
* **types:** Add missing arc.needle.value ([e0a30fe](e0a30fe)), closes [#3697](#3697)
* **types:** Add missing region.label option ([e03057c](e03057c)), closes [#3732](#3732)
* **types:** Correct typo in BarOptions ([a0ad93a](a0ad93a)), closes [#3749](#3749)
* **types:** Fix missing polar type ([7f5d5b0](7f5d5b0)), closes [#3778](#3778)

### Features

* **axis:** Intent to ship axis.tooltip ([54e77cb](54e77cb)), closes [#3603](#3603)
* **axis:** Intent to ship axis.x.forceAsSingle ([6ad0554](6ad0554)), closes [#3764](#3764)
* **bundler:** Migrate babel -> esbuild ([ff0a98c](ff0a98c)), closes [#3601](#3601)
* **funnel:** Intent to ship funnel type ([e4cdda1](e4cdda1)), closes [#3449](#3449)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants