question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot read property 'Inside' of undefined

See original GitHub issue

react-d3-speedometer version: 0.12.0 react version: 16.13.1 typescript: 3.7.2

Question

I was trying to implement react-d3-speedometer using typescript.
When I tried to apply position in customSegmentLabels , I get an error Type '"OUTSIDE"' is not assignable to type 'CustomSegmentLabelPosition'. So I added it to imports but when I assigned it to position like this:
position: CustomSegmentLabelPosition.Inside, then the error Cannot read property ‘Inside’ of undefined.

Sample Codesandbox
Sample

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
palerdotcommented, Aug 24, 2020

Also regarding

Also, it would be nice in the next update if the text will curve alongside with the bar.

I’m tracking this here - https://github.com/palerdot/react-d3-speedometer/issues/82

1reaction
palerdotcommented, Aug 24, 2020

Hi,

I’m reopening this issue to keep track of this behavior. The right behavior is to do CustomSegmentLabelPosition.Inside / CustomSegmentLabelPosition.Outside

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot Read Property of Undefined in JavaScript - Rollbar
Undefined means that a variable has been declared but has not been assigned a value. In JavaScript, properties and functions can only belong...
Read more >
Uncaught TypeError: Cannot read property of undefined In
JavaScript TypeError is thrown when an operand or argument passed to a function is incompatible with the type expected by that operator or...
Read more >
[Solved] Cannot read Properties of Undefined in JavaScript
The "Cannot read properties of undefined" error occurs when you try to access a property or a method on a variable that stores...
Read more >
Uncaught TypeError : Cannot read properties of undefined
The solution to TypeError: Cannot read properties of undefined ... The root cause of the error is that the declared variable doesn't have...
Read more >
angular2: Error: TypeError: Cannot read property '...' of ...
Because I have several property inside a JSON and it is not possible for each property to write if condition. Earlier in angularjs...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found