oesmith/morris.js — Issue #19: Works with 3 data points but breaks on 2
Author: peterbe
Created: 2012-02-29 01:12:56+00:00
State: open

This works:

```javascript
var DATA = [
{y: '2011-04', a: 75, b: 50},
{y: '2011-03', a: 75, b: 50},
{y: '2011-02', a: 100, b: 75}];

$(function() {

// quarterly data, custom colors, skinny lines
Morris.Line({
element: 'container',
data: DATA,
xkey: 'y',
ykeys: ['a', 'b'],
labels: CATEGORIES,
//lineColors: ['#167f39','#044c29'],
lineWidth: 2
});
```

This draws equally but when I hover over the graph I get an error::

```javascript
var DATA = [
// NOTICE how there's only 2 data points this time.
{y: '2011-03', a: 75, b: 50},
{y: '2011-02', a: 100, b: 75}];

$(function() {

// quarterly data, custom colors, skinny lines
Morris.Line({
element: 'container',
data: DATA,
xkey: 'y',
ykeys: ['a', 'b'],
labels: CATEGORIES,
//lineColors: ['#167f39','#044c29'],
lineWidth: 2
});

```
The error is: ``z[b][a] is undefined``

I'm going to try to find out what the error is in the not-compressed version.