Dear all,

I am developing an app which contains charts and a dashboard. I am 
experimenting with ChartistJS and tried to replicate the first example of 
its website in web2py.

in layout.html, I added:

 <!-- include stylesheets -->
    <link rel="stylesheet" 
href="{{=URL('static','css/bootstrap.min.css')}}"/>
    <link rel="stylesheet" 
href="{{=URL('static','css/web2py-bootstrap4.css')}}"/>
    <link rel="stylesheet" 
href="{{=URL('static','css/chartist.min.css')}}"/>
    <link rel="shortcut icon" 
href="{{=URL('static','images/favicon.ico')}}" type="image/x-icon">
    <link rel="apple-touch-icon" 
href="{{=URL('static','images/favicon.png')}}">

   ...

<!-- The javascript =============================== -->
    <script src="{{=URL('static','js/bootstrap.min.js')}}"></script>
    <script src="{{=URL('static','js/web2py-bootstrap4.js')}}"></script>
    <script src="{{=URL('static','js/chartist.min.js')}}"></script>

in default/index.html, I added:

{{extend 'layout.html'}}

{{block content}}
<div class="container">
  <div class="ct-chart ct-perfect-fourth"></div>
</div>
    <script>
        var data = {
          labels: ['Week1', 'Week2', 'Week3', 'Week4', 'Week5', 'Week6'],
          series: [
                [5, 2, 4, 2, 0]
             ]
        };

        var myChart = new Chartist.Line('.ct-chart', data);
    </script>
{{end}}

I also added the corresponding files to static js and css, but nothing 
appears. What am i missing?

I am using web2py 2.16.1 and python 3.6.2.

Thanks

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to