cubism.js

minimal cubism.js horizon chart example (TypeError: callback is not a function)

不想你离开。 提交于 2019-12-24 08:15:27
问题 I'm having a devil of a time going from any code found on the d3 and cubism API pages to altering things to work with what I need them to do... I'm trying to follow the steps for a Horizon graph as listed here https://github.com/square/cubism/wiki/Horizon but I don't have a Cube or Graphite data source. So I'm trying to make a minimal example metric from mbostock's answer here Using Other Data Sources for cubism.js and/or the random-value-returning metric example here https://github.com

more minimaler cubism.js horizon chart from json example

余生颓废 提交于 2019-12-11 18:37:05
问题 Following up on a previous question... I've got my minimal horizon chart example much more minimaler than before ( minimal cubism.js horizon chart example (TypeError: callback is not a function) ) <body> <div class="mag"></div> <script type="text/javascript"> var myContext = cubism.context(); var myMetr = myContext.metric(function(start, stop, step, callback) { d3.json("../json/600s.json.php?t0=" + start/1000 + "&t1=" + stop/1000 + "&ss=" + step/1000, function(er, dt) { if (!dt) return

Can we use custom JSON Data on Cubism?

只谈情不闲聊 提交于 2019-12-05 00:03:21
问题 I saw the cubism graphs and they are simply amazing. I have a big JSON file with 1000 entries that have a timestamp and a value (integer). Can Cubism graph those or not?! I can't seem to find documentation on this... 回答1: Cubism is generally intended for realtime data, but you can implement a metric that simply returns static values from a JSON file. Typically you do this by using context.metric. See the stocks demo in the Cubism intro talk for an example. 来源: https://stackoverflow.com

Change scale default in cubism.js

只谈情不闲聊 提交于 2019-12-01 22:46:16
问题 I'm using cubism.js to graph some static data from a JSON object. We want to be able to display a years worth of data, with a point for each day. I have the solution working partially but I'd like to be able to set the scale independent of today's date, i.e. I'd like to graph data from yesterday to the corresponding day last year. I've tried the following without success: context.scale(d3.time.scale().domain([start, end]).range([0,96])) where start and end come from the JSON object. Is it

Change scale default in cubism.js

拈花ヽ惹草 提交于 2019-12-01 22:11:05
I'm using cubism.js to graph some static data from a JSON object. We want to be able to display a years worth of data, with a point for each day. I have the solution working partially but I'd like to be able to set the scale independent of today's date, i.e. I'd like to graph data from yesterday to the corresponding day last year. I've tried the following without success: context.scale(d3.time.scale().domain([start, end]).range([0,96])) where start and end come from the JSON object. Is it possible to set the cubism scale to behave in this way ? Many thanks, Michael The stocks demo from the

Using Other Data Sources for cubism.js

核能气质少年 提交于 2019-11-27 19:25:55
I like the user experience of cubism, and would like to use this on top of a backend we have. I've read the API doc's and some of the code, most of this seems to be extracted away. How could I begin to use other data sources exactly? I have a data store of about 6k individual machines with 5 minute precision on around 100 or so stats. I would like to query some web app with a specific identifier for that machine and then render a dashboard similar to cubism via querying a specific mongo data store. Writing the webapp or the querying to mongo isn't the issue. The issue is more in line with the

Using Other Data Sources for cubism.js

心已入冬 提交于 2019-11-26 19:52:54
问题 I like the user experience of cubism, and would like to use this on top of a backend we have. I've read the API doc's and some of the code, most of this seems to be extracted away. How could I begin to use other data sources exactly? I have a data store of about 6k individual machines with 5 minute precision on around 100 or so stats. I would like to query some web app with a specific identifier for that machine and then render a dashboard similar to cubism via querying a specific mongo data