nvd3 Box Plot with Dates

395 Views Asked by At

I'm trying to get a box plot going where my Y axis is going to be Dates. I have tried to strip down to the bare minimum and I only see "No Data Available".

Here is the plunker

$scope.data = [{
                   label: "Sample A",
                   values: {
                      Q1: new Date(),
                      Q2: new Date()
                   }
                 },
               ];

I just want to see some Dates and I can go forward from there.

Thanks!

1

There are 1 best solutions below

1
On BEST ANSWER

You have to specify Q3 too.

$scope.data = [{
     label: "Sample A",
     values: {
         Q1: new Date(),
         Q2: new Date(),
         Q3: new Date()
     }
}];

It's because nvd3 boxplot use the first quartile, the mediam (Q2), and the third quartile.

Here is a working example