Chart for web developper

    Rating: ★★★★☆
    View: 213
    Download: 151
    Từ khóa:

    First, we have to define a canvas element in our html document:

            Your web-browser does not support the HTML 5 canvas element.

    Then all we have to do is include awesomechart.js in our document's header, create a new AwesomeChart object and pass our data to it:


    The code above will produce the following result:

    But, what if we want to change the chart type to a doughnut chart? It's really easy, we just have to set the chart's type to 'doughnut' before calling draw():

     mychart.chartType = 'doughnut';

    This is the result:

    Or we could create a Pareto chart (chartType='pareto'):

    The 'chartType' property controls which type of chart will be rendered:

    Chart type chartType property value
    Horizontal bar chart default
    Vertical bar chart horizontal bars
    Pareto chart pareto
    Pie chart pie
    Exploded chart exploded pie
    Doughnut chart doughnut


    loading Đang tải...

    template được ưa chuộng