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

Gauge: redraw broken for interaction = false #2351

Closed
adschm opened this issue Oct 5, 2021 · 4 comments
Closed

Gauge: redraw broken for interaction = false #2351

adschm opened this issue Oct 5, 2021 · 4 comments
Labels

Comments

@adschm
Copy link
Contributor

adschm commented Oct 5, 2021

I just received the following error when testing 3.2.0-next.6 (pre-built files from CDNjs):

billboard.min.js?v=MWQUJffqrmq-qSwgkpnLkKsUMAtR248dGo-JEtvytnE:10 Uncaught TypeError: e.bind is not a function
at SVGPathElement. (billboard.min.js?v=MWQUJffqrmq-qSwgkpnLkKsUMAtR248dGo-JEtvytnE:10)
at SVGPathElement. (d3.min.js?v=rblfh2jLoLyQozdZ2Ld8dL1JgFny52U1spVdvUOo9Vs:2)
at Fn.each (d3.min.js?v=rblfh2jLoLyQozdZ2Ld8dL1JgFny52U1spVdvUOo9Vs:2)
at Fn.style (d3.min.js?v=rblfh2jLoLyQozdZ2Ld8dL1JgFny52U1spVdvUOo9Vs:2)
at t.redrawArc (billboard.min.js?v=MWQUJffqrmq-qSwgkpnLkKsUMAtR248dGo-JEtvytnE:10)
at t.redraw (billboard.min.js?v=MWQUJffqrmq-qSwgkpnLkKsUMAtR248dGo-JEtvytnE:10)
at t.e.initWithData (billboard.min.js?v=MWQUJffqrmq-qSwgkpnLkKsUMAtR248dGo-JEtvytnE:10)
at t.e.initToRender (billboard.min.js?v=MWQUJffqrmq-qSwgkpnLkKsUMAtR248dGo-JEtvytnE:10)
at t.e.init (billboard.min.js?v=MWQUJffqrmq-qSwgkpnLkKsUMAtR248dGo-JEtvytnE:10)
at new t (billboard.min.js?v=MWQUJffqrmq-qSwgkpnLkKsUMAtR248dGo-JEtvytnE:10)

The corresponding Gauge chart does not show up. However, another one on the same dashboard appears to be working.

D3 version is 7.1.1.

I currently don't have time to investigate this further, so sorry for posting it in this shape. Just in case it's easy to deduce from code changes.

@adschm
Copy link
Contributor Author

adschm commented Oct 5, 2021

Two quick insights though:

  1. The issue is introduced between 3.2.0-next.3 and -next.4.
  2. It affects the single-Gauge. Multi-Gauge works fine. Both single and multi gauge are affected.

@netil
Copy link
Member

netil commented Oct 6, 2021

@adschm can you share the reproducible generation option?

Just the simple gauge type generation, it doesn't generate any error.

@adschm
Copy link
Contributor Author

adschm commented Oct 6, 2021

Fortunately, I was able to narrow it down relatively quickly. It's caused by

    interaction: {
      enabled: false
    },

https://jsfiddle.net/adschm/0f5rj9nc/9/

Note that point 2 of my earlier post was wrong, I actually use multi-gauge here as well, although only one "line" is plotted. But it seems to break also for single-gauge, I just only disabled interaction for the plots with one data point in my local code.

@adschm adschm changed the title Gauge: e.bind is not a function Gauge: redraw broken for interaction = false Oct 6, 2021
@netil netil added the bug label Oct 6, 2021
@netil
Copy link
Member

netil commented Oct 6, 2021

thanks, is a side-effect caused by the 5efa615.

netil added a commit to netil/billboard.js that referenced this issue Oct 6, 2021
Fix the use of optional chaining on redrawArc

Ref naver#2351
@netil netil closed this as completed in cc4a5e7 Oct 6, 2021
github-actions bot pushed a commit that referenced this issue Oct 7, 2021
# [3.2.0](3.1.5...3.2.0) (2021-10-07)

### Bug Fixes

* **axis:** fix y axis stepSize value ([18f6f27](18f6f27)), closes [#2294](#2294)
* **bar:** fix data label to be shown for 0 values ([f3634ee](f3634ee)), closes [#2251](#2251)
* **event:** make consistent tooltip position on step-after ([5d3a5ed](5d3a5ed)), closes [#2287](#2287)
* **gauge:** fix error when interaction=false ([cc4a5e7](cc4a5e7)), closes [#2351](#2351)
* **grid:** Make grid elements pass through pointer events ([4db1bcd](4db1bcd)), closes [#2355](#2355)
* **grid:** pPrevent error throw  ([8fcf61c](8fcf61c)), closes [#2310](#2310)
* **plugin:** fix textoverlap plugin ([5e486b5](5e486b5)), closes [#1144](#1144)
* **subchart:** fix subchart esm import failure ([ba6c2b5](ba6c2b5)), closes [#2255](#2255)
* **tooltip:** fix tooltip.position call context ([b78a48d](b78a48d)), closes [#2265](#2265)
* **types:** Allow string dates for zoom() domain ([9cae479](9cae479)), closes [#2316](#2316) [#2333](#2333)
* **types:** fix data.onshown/hidden types ([3721c4c](3721c4c)), closes [#2270](#2270) [#2275](#2275)
* **types:** Fix type definition for load().json ([25ebb78](25ebb78)), closes [#2334](#2334)
* **types:** Fix wrong type definition ([5f7779b](5f7779b)), closes [#2316](#2316)
* **zoom:** Fix error throw on drag zoom interaction ([f1dcb27](f1dcb27)), closes [#2343](#2343)
* **zoom:** fix zoom event triggering for drag type ([0a0f039](0a0f039)), closes [#2254](#2254)
* **zoom:** Fix zoomend call on .zoom()  ([9515565](9515565)), closes [#2217](#2217) [#2254](#2254)

### Features

* **axis:** Enhance padding to accept px value ([769ec8f](769ec8f)), closes [#2246](#2246)
* **error:** Enhance error logging for ESM import ([4b5119c](4b5119c)), closes [#2311](#2311)
* **event:** add option for step-before/step-after charts for tooltip to match step behavior ([5f664ba](5f664ba)), closes [#2332](#2332)
* **module:** Support dual CJS/ESM package ([ddd8977](ddd8977)), closes [#2202](#2202)
* **plugin:** Intent to ship sparkline ([091284e](091284e)), closes [#2285](#2285)
* **plugin:** Intent to ship TableView plugin ([6f07e94](6f07e94)), closes [#1873](#1873)
* **Subchart:** add subchart x axis tick format option ([da2f3ff](da2f3ff)), closes [#2314](#2314)
* **tooltip:** Enhance tooltip.position passing curr pos ([ec783e9](ec783e9)), closes [#2267](#2267)
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