0

How would I add a title, name the axis and change the colour of the y and x axis values for this bar chart:

// bar chart data
        var barData = {
            labels : ["January","February","March","April","May","June"],
            datasets : [
                {
                    fillColor : "#48A497",
                    strokeColor : "#48A4D1",
                    data : [456,479,324,569,702,600]
                },
                {
                    fillColor : "rgba(73,188,170,0.4)",
                    strokeColor : "rgba(72,174,209,0.4)",
                    data : [364,504,605,400,345,320]
                }
            ]
        }
        // get bar chart canvas
        var income = document.getElementById("income").getContext("2d");
        // draw bar chart
        new Chart(income).Bar(barData);
user3506938
  • 563
  • 2
  • 8
  • 17
  • I have answered how to change label colors here: http://stackoverflow.com/questions/22513023/change-label-font-color-for-a-line-chart-using-chart-js/22513650#22513650 As to title and axis labels, there are no such functions, you have to create and position your own div-elements manually. – vortexwolf Apr 28 '14 at 20:05
  • and with your example, how cna u change the font / size of the axis text? Thank you ! – user3506938 Apr 28 '14 at 22:13
  • 1
    http://www.chartjs.org/docs/ The option that you need is called scaleFontSize. – vortexwolf Apr 29 '14 at 11:36

0 Answers0