I am trying to customize a chart chart diagram with the following code. Where in this place I put the code Chart.defaults.global = {} or Chart.defaults.global.responsive = true; ?
Chart.js docs can be found here: http://www.chartjs.org/docs/
<script src="http://cdnjs.cloudflare.com/ajax/libs/Chart.js/0.2.0/Chart.min.js"></script> <script> var ctx = document.getElementById("myChart").getContext("2d"); var data = { labels: ["Week 1", "Week 2", "Week 3", "Week 4", "Week 5", "Week 6", "Week 7"], datasets: [ { label: "My Second dataset", fillColor: "rgba(151,187,205,0.2)", strokeColor: "rgba(151,187,205,1)", pointColor: "rgba(151,187,205,1)", pointStrokeColor: "#fff", pointHighlightFill: "#fff", pointHighlightStroke: "rgba(151,187,205,1)", data: [86, 74, 68, 49, 42] } ] }; var options = { ... }; var myLineChart = new Chart(ctx).Line(data, options); </script>
javascript charts
user2608266
source share