I am trying to make a demonstration using cubism. I have created a custom context.metric
, similar to the random()
function on the cubism homepage. This loads my data set and renders correctly, showing a new row each second.
What I want to do now is have the axis scale domain update as well, using the date column from my dataset. For the purposes of demonstration, I want each second that passes in wall-time to correspond to one row in my dataset, which is hourly. I can set the scale domain when I create the context, but I cannot get it to update when new data is fetched.
I have tried to listen for context events such as change
, and beforechange
and manually update the domain there. It does not seem to work, or I am doing something wrong. Any suggestions would be greatly appreciated.
Thanks for the awesome libraries!