Error: <path> attribute d: Expected moveto path command ('M' or 'm'), "null".
See original GitHub issueHi there,
I am trying to create a line chart with both negative and positive values and highlight the chart based on the value (exactly like here: https://nivo.rocks/storybook/?path=/story/line--highlighting-negative-values)
It’s all good and it works perfectly fine but there is an annoying case: when i end up having no negative values, I get this error in console: Error: <path> attribute d: Expected moveto path command ('M' or 'm'), "null"
To Reproduce I’ve created two sandboxes:
- one with the error: https://codesandbox.io/s/nivo-highlight-negative-colors-with-no-negative-values-wypw3?file=/src/index.js
- and one that works when having both negative and positive values: https://codesandbox.io/s/nivo-highlight-negative-values-638nz?file=/src/index.js
The sandbox uses nivo@0.71.0 but it’s also reproducible in v0.74.0.
Screenshots
As I can see, this doesn’t influence the behaviour of the chart, it just throws that annoying error in the console.
Thank you for this awesome library! 🙏🙏
Issue Analytics
- State:
- Created 2 years ago
- Reactions:6
- Comments:5
Top Results From Across the Web
D3 Simple Line Chart: Error: <path> attribute d: Expected ...
and I keep getting this error: Error: <path> attribute d: Expected moveto path command ('M' or 'm'), "[object Object]". Your code doesn't throw ......
Read more >[Solved]-d3.v5.min.js:2 Error: <path> attribute d: Expected ...
Coding example for the question d3.v5.min.js:2 Error: attribute d: Expected moveto path command ('M' or 'm'), "function a(a){va…"-d3.js.
Read more >raphael.min.js:1 Error: <path> attribute d: Expected moveto ...
js:1 Error: <path> attribute d: Expected moveto path command ('M' or 'm'), "Z". Add Answer | View In TPC Matrix. Technical Problem Cluster...
Read more >Edit: Move circle issue - Esri Community
Getting this error: Error: <path> attribute d: Expected moveto path command ('M' or 'm'), "Z". There is any way to get the new...
Read more >I have an error with my SVG chart: attribute d - Expected number
Can you tell me what this error means? Error: <path> attribute d: Expected number, "?.69266055045871 null L64.9235474?". RGraph.svg.common ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
we saw this behavior when we passed a data array of all null values to one of the lines in a line chart.
note to self: don’t do that.
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you!