0

I have time-sensitive data that ranges from now until 7 days from now with hourly resolution ~220 values. I was able to get them to plot following Mike Bostock's demo here: http://bost.ocks.org/mike/cubism/intro/demo-stocks.html

but I can't seem to find how to extend the timescales and data to span across the entire display. I was looking for an extent argument or xrange or width, but I haven't had any luck. I'm sure the answer is trivial, but I can't seem to find it.

Horizon test plot

var context = cubism.context()
.step(3600000) // <-- this changes the time resolution
.size(1280) // <-- this changes the width
.stop();

Also, d3.time.scale.domain seems to be undefined in d3.v3.min.js.

Here's the fiddle that shows you what the code looks like (because it's calling d3.csv I wasn't sure how to get it completely working in the fiddle...so I included the csv file below the javascript.) : http://jsfiddle.net/oay7tvq0/

Jonathan
  • 894
  • 2
  • 9
  • 20
  • Your fiddle is not working at all. – Dwayne Towell Oct 25 '14 at 03:39
  • @DwayneTowell - Sorry, I updated the text to reflect that the fiddle doesn't completely work due to ajax issues. The relevant code and data should all be there. – Jonathan Oct 25 '14 at 20:18
  • I *think* that cubism uses a single pixel for each time slice, so if you've only got 220 timesteps only 220 pixels are needed. Check the documentation to be sure. If I'm correct then you'll either have to be creative with your timeseries and extend the timestep (by repeating adjacent records) or perhaps d3 (or one of the various libraries built on it) would better suit your purposes. – user1614080 Oct 26 '14 at 07:56
  • @user1614080 Thanks for the reply. I ended up replicating the data, but that caused an axis issue. I'm still fiddling with it. :-) – Jonathan Nov 02 '14 at 18:21

1 Answers1

1

I think that cubism uses a single pixel for each time slice, so if you've only got 220 timesteps only 220 pixels are needed. Check the documentation to be sure. If I'm correct then you'll either have to be creative with your timeseries and extend the timestep (by repeating adjacent records) or perhaps d3 (or one of the various libraries built on it) would better suit your purposes. – user1614080

This I'm sure is the answer...

Jonathan
  • 894
  • 2
  • 9
  • 20