Comments (3)
Here is my html source code:
<!DOCTYPE html> <meta charset="utf-8" /> <h2><a href="http://catcap.cn"><img src="http://tp3.sinaimg.cn/2453988174/180/5632977800/0" id="logo"></a>>系统负载</h2> <style> @import url(//fonts.googleapis.com/css?family=Yanone+Kaffeesatz:400,700); @import url(./css/style.css); </style> <div id="body"> <div id="example1"></div> <script type="text/javascript" src="./js/d3.v3.js"></script> <script type="text/javascript" src="./js/cubism.v1.js"></script> <script type="text/javascript" src="./js/highlight.min.js"></script> <script>
var context = cubism.context() .serverDelay(0)
.clientDelay(0)
.step(1e3)
.size(960);
var graphite = context.graphite("http://192.168.170.195:8080"); var horizon = context.horizon().metric(graphite.metric).height(50);
var metrics = [
"system.loadavg_1min",
"carbon.agents.Router1008_catcapstudio_com-a.cpuUsage"
]
d3.select("#example1").call(function(div) {
div.append("div")
.attr("class", "axis")
.call(context.axis().orient("top"));
div.selectAll(".horizon")
.data(metrics)
.enter().append("div")
.attr("class", "horizon")
.call(horizon);
div.append("div")
.attr("class", "rule")
.call(context.rule());
});
</script>
from cubism.
I had figured out that there was something wrong with griphte django :
Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs) File "/opt/graphite/webapp/graphite/render/views.py", line 104, in renderView
seriesList = evaluateTarget(requestContext, target)
File "/opt/graphite/webapp/graphite/render/evaluator.py", line 10, in evaluateTarget
result = evaluateTokens(requestContext, tokens)
File "/opt/graphite/webapp/graphite/render/evaluator.py", line 21, in evaluateTokens
return evaluateTokens(requestContext, tokens.expression)
File "/opt/graphite/webapp/graphite/render/evaluator.py", line 28, in evaluateTokens
args = [evaluateTokens(requestContext, arg) for arg in tokens.call.args]
File "/opt/graphite/webapp/graphite/render/evaluator.py", line 21, in evaluateTokens
return evaluateTokens(requestContext, tokens.expression)
File "/opt/graphite/webapp/graphite/render/evaluator.py", line 28, in evaluateTokens
args = [evaluateTokens(requestContext, arg) for arg in tokens.call.args]
File "/opt/graphite/webapp/graphite/render/evaluator.py", line 21, in evaluateTokens
return evaluateTokens(requestContext, tokens.expression)
File "/opt/graphite/webapp/graphite/render/evaluator.py", line 24, in evaluateTokens
return fetchData(requestContext, tokens.pathExpression)
File "/opt/graphite/webapp/graphite/render/datalib.py", line 224, in fetchData
dbResults = dbFile.fetch( timestamp(startTime), timestamp(endTime) )
File "/opt/graphite/webapp/graphite/storage.py", line 298, in fetch
(timeInfo,values) = whisper.fetch(self.fs_path, startTime, endTime)
TypeError: 'NoneType' object is not iterable
from cubism.
This doesn’t appear to be a bug in Cubism. I recommend trying Stack Overflow if you want help.
Also, if your dashboard and Graphite install are on separate servers, make sure you have Access-Control-Allow-Origin: * enabled on Graphite so that the results are accessible.
from cubism.
Related Issues (20)
- Still maintained? HOT 14
- Datetime synchronization with data HOT 1
- Rule disappears HOT 1
- Docs for beginners, or alternative library? HOT 1
- d3.time still work for d3.v4? HOT 1
- possible to show a line graph instead?
- How to start the examples? The readme does not explain HOT 2
- How get data from server
- A D3V5 & ES6 port of cubism HOT 3
- ism es
- serverDelay() does not respect delays where data is from prior day
- Dynamic extent? HOT 1
- suport InfluxDB? HOT 14
- Is the any plan to integrate Cubism.js with Grafana? HOT 1
- Wiki links to API reference broken HOT 1
- How to start to use Cubism HOT 1
- horizon doesn't draw data after a stop and start
- horizon.remove does not unbind / remove listeners / data fetch
- Default extent & 3-sigma HOT 1
- Color cycling in horizon graphs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cubism.