DHTMLX Docs & Samples Explorer

### Labels

There are two properties to define sectors labels:

- label - defines text outside sectors
- pieInnerText - set text inside sectors
Source

    <script src="../../codebase/dhtmlxchart.js" type="text/javascript"></script>
    <link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxchart.css">
    <script>var data = [{
        sales: "3.0",
        year: "2000"
    }, {
        sales: "3.8",
        year: "2001"
    }, {
        sales: "3.4",
        year: "2002"
    }, {
        sales: "4.1",
        year: "2003"
    }, {
        sales: "4.3",
        year: "2004"
    }, {
        sales: "10.7",
        year: "2005"
    }, {
        sales: "7.4",
        year: "2006"
    }, {
        sales: "9.0",
        year: "2007"
    }, {
        sales: "7.3",
        year: "2008"
    }, {
        sales: "4.8",
        year: "2009"
    }];
    window.onload = function() {
        var pieChart = new dhtmlXChart({
            view: "pie",
            container: "chart",
            value: "#sales#",
            pieInnerText: "#sales#",
            label: "#year#";
        });
        pieChart.parse(data, "json");
    }</script>

    <div id="chart" style="width:450px;height:300px;"></div></td>