-
Notifications
You must be signed in to change notification settings - Fork 12k
Closed
Milestone
Description
With a line plot, with no labels specified, I get:
Chart.bundle.js:13295 Uncaught TypeError: Cannot read property 'length' of undefined
in version 2.3.0. Where that error is on the labels attribute and it occurs because I haven't specified labels.
I'm new to using this library, but it doesn't seem like that should be required. I can also get around it by specifying ticks {min: mymin, max:mymax}.
Here is the full, self-contained html to recreate the issue
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.3.0/Chart.bundle.js"></script>
</head>
<body>
<canvas id="canvas" height=400, width=400></canvas>
</body>
<script>
var ctx = document.getElementById("canvas").getContext("2d");
new Chart(ctx,
{"type":"line","data":{"datasets":[{"data":[{"x":0.00,"y":0.00},{"x":1.00,"y":1.00},{"x":2.00,"y":2.00},{"x":8.00,"y":8.00},{"x":9.00,"y":9.00}]}]},"options":{"responsive":true}}
)
</script>
</html>