首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >chartist.js库没有显示任何内容。

chartist.js库没有显示任何内容。
EN

Stack Overflow用户
提问于 2016-02-14 06:37:03
回答 1查看 1.7K关注 0票数 0

我想使用chartist.js,但是我的工具没有显示任何内容:

http://gionkunz.github.io/chartist-js/getting-started.html

我的代码(charts.html):

代码语言:javascript
复制
<html>
  <head>
    <title>My first Chartist Tests</title>
    <link rel="stylesheet"
          href="chartist.min.css">
  </head>
  <body>
    <!-- Site content goes here !-->
    <script src="chartist.min.js"></script>


<script type="text/javascript">

new Chartist.Line('.ct-chart', {
  labels: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'],
  series: [
    [12, 9, 7, 8, 5],
    [2, 1, 3.5, 7, 3],
    [1, 3, 4, 5, 6]
  ]
}, {
  fullWidth: true,
  chartPadding: {
    right: 40
  }
});

</script>

  </body>
</html>

我哪里错了?

解决了

添加以下行代码:

代码语言:javascript
复制
<div class="ct-chart ct-perfect-fourth"></div>
EN

回答 1

Stack Overflow用户

发布于 2016-02-14 06:44:39

添加以下行代码:

代码语言:javascript
复制
<div class="ct-chart ct-perfect-fourth"></div>
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/35389103

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档