我们希望在我们的cumulocity web应用程序中使用dc.js,但我们发现尝试这样做的问题。该应用程序独立运行良好,但是当我们想要在累积中使用它时,它不会。将dc.js添加到cumulocity web应用程序
这里是我们的独立代码:
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='utf-8'>
<title>QWHealth Experiment</title>
<style type="text/css"></style>
<style>
h4 span {
font-size:14px;
font-weight:normal;
}
h2 {
float: right;
}
h2 span {
font-size:14px;
font-weight:normal;
}
</style>
<script src='https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.17/d3.min.js' type='text/javascript'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/crossfilter/1.3.11/crossfilter.min.js' type='text/javascript'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/dc/2.0.0/dc.min.js' type='text/javascript'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js' type='text/javascript'></script>
<script src="https://npmcdn.com/[email protected]/dist/js/tether.min.js"></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/js/bootstrap.min.js' type='text/javascript'></script>
<link href='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/css/bootstrap.min.css' rel='stylesheet' type='text/css'>
<link href='http://cdnjs.cloudflare.com/ajax/libs/dc/2.0.0/dc.min.css' rel='stylesheet' type='text/css'>
</head>
.....
下面是独立的结果是:
然后我们尝试在Cumulocity运行和cumulocity早已d3.js,引导等等。我们只是修改脚本加载。
<head>
<meta charset='utf-8'>
<title>QWHealth Experiment</title>
<style type="text/css"></style>
<style>
h4 span {
font-size:14px;
font-weight:normal;
}
h2 {
float: right;
}
h2 span {
font-size:14px;
font-weight:normal;
}
</style>
<script src='https://cdnjs.cloudflare.com/ajax/libs/crossfilter/1.3.11/crossfilter.min.js' type='text/javascript'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/dc/2.0.0/dc.min.js' type='text/javascript'></script>
<link href='http://cdnjs.cloudflare.com/ajax/libs/dc/2.0.0/dc.min.css' rel='stylesheet' type='text/css'>
</head>
然而,我们看到,dc.js加载成功,所以,我缺少什么?
在此先感谢!
编辑:
link to the index-cumulocity.html
link to the index.html which is the standalone app
您的应用程序在任何地方都可以使用吗? – Stilltorik