-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Description
Issue
Having an issue with your funnel graph library where I can have default values as 0, but it logs errors to my console when I draw the graph with those values.
Explanation
The actual functionality of the graph is fine, it displays with no data as it should and shows 0 as all values.
The issue is that it also sends a error for NaN as I suspect that it is trying to draw the graph with no data to work with instead of ignoring the draw entirely.
This quickly becomes bloat in my error-logs when debugging, especially when i'm updating the graph on a timed interval of 5 seconds.
Images
Example
Example on how to replicate this issue: (The values are the only important part)
-> The code was meant to serve as a example, may not be runnable
const graph = new FunnelGraph({
container: ".funnel",
gradientDirection: "horizontal",
data: {
labels: ["X", "Y", "Z"],
colors: ["#000000", "#000000"],
values: [0, 0, 0]
},
displayPercent: true,
direction: "horizontal",
width: 1000,
height: 100,
subLabelValue: "raw"
})
graph.draw();
EvertonWingert
Metadata
Metadata
Assignees
Labels
No labels