Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <canvas id="bar-chart-grouped" width="800" height="350"></canvas>
- <script>
- new Chart(document.getElementById("bar-chart-grouped"), {
- type: 'bar',
- data: {
- labels: [{% for result in results %}
- "{{result.title}}",
- {% endfor %}],
- datasets: [
- {
- label: "Rating",
- backgroundColor: "#3e95cd",
- data: [{% for result in results %}
- "{{result.w_average}}",
- {% endfor %}]
- }, {
- label: "My Rating",
- backgroundColor: "#3cba9f",
- data: [{% for result in results %}
- "{{result.rating}}",
- {% endfor %}]
- }
- ]
- },
- options: {
- title: {
- display: true,
- text: 'Movie Ratings'
- }
- }
- });
- </script>
Add Comment
Please, Sign In to add comment