I'm trying to render real-time data using Cubism. Every 5 seconds I'm using a custom metric to poll my own data source and I'm displaying the last 2 hours of data. I'm building my context with:
var context = cubism.context().step(5000).size(1440);
I start out by plotting the past 2 hours of data, then start adding on in real-time. I don't need to show any axes, just the horizon chart by itself.
The catch is I need to render this graph within 216px of screen real-estate. When I render it, it doesn't seem to be adjusting for the width of the graph. Instead, the canvas always has a width of "1440", and (when I turn off the container's width) the chart goes all the way across the page.
On top of that, the horizon bars look terrible. They are very disjointed, and the dark vs. light is very scattered. See the screenshot for an idea of what I'm seeing:
Also, here is a gist containing the values rendered in this chart.
How do I get Cubism to render this chart properly using the correct width?
Thanks!