title font

Specifies font options for the title.

Type: Object

Show Example:
jQuery

In this example, the font options of the chart title are changed.

<div id="pieChartContainer" style="height:400px;max-width:600px;margin: 0px auto"></div>
var dataSource = [
    { continent: 'Africa', population: 1022234000 },
    { continent: 'Antarctica', population: 4490 },
    { continent: 'Asia', population: 4164252000 },
    { continent: 'Australia', population: 29127000 },
    { continent: 'Europe', population: 738199000 },
    { continent: 'North America', population: 542056000 },
    { continent: 'South America', population: 392555000 }
];

$(function () {
    $("#pieChartContainer").dxPieChart({
        dataSource: dataSource,
        series: {
            argumentField: 'continent',
            valueField: 'population'
        },
        title: {
            text: 'Population by Continent',
            font: {
                color: 'steelblue',
                family: 'Zapf-Chancery, cursive',
                opacity: 0.75,
                size: 25,
                weight: 400
            }
        }
    });
});

color

Specifies a font color for the title.

Type: String
Default Value: '#232323'

This option supports the following colors.

  • hexadecimal colors
  • RGB colors
  • RGBA colors (not supported in Internet Explorer 8)
  • predefined/cross-browser color names
  • predefined SVG colors (not supported in Internet Explorer 8)
Show Example:
jQuery

In this example, the title text's font color is blue.

<div id="pieChartContainer" style="height:400px;max-width:600px;margin: 0px auto"></div>
var dataSource = [
    { continent: 'Africa', population: 1022234000 },
    { continent: 'Antarctica', population: 4490 },
    { continent: 'Asia', population: 4164252000 },
    { continent: 'Australia', population: 29127000 },
    { continent: 'Europe', population: 738199000 },
    { continent: 'North America', population: 542056000 },
    { continent: 'South America', population: 392555000 }
];

$(function () {
    $("#pieChartContainer").dxPieChart({
        dataSource: dataSource,
        series: {
            argumentField: 'continent',
            valueField: 'population'
        },
        title: {
            text: 'Population by Continent',
            font: {
                color: 'blue'
            }
        }
    });
});

family

Specifies a font family for the title.

Type: String
Default Value: "'Segoe UI Light', 'Helvetica Neue Light', 'Trebuchet MS', Verdana"

For details on acceptable values, refer to the Font family article.

Show Example:
jQuery

In this example, the chart title text's font family is changed.

<div id="pieChartContainer" style="height:400px;max-width:600px;margin: 0px auto"></div>
var dataSource = [
    { continent: 'Africa', population: 1022234000 },
    { continent: 'Antarctica', population: 4490 },
    { continent: 'Asia', population: 4164252000 },
    { continent: 'Australia', population: 29127000 },
    { continent: 'Europe', population: 738199000 },
    { continent: 'North America', population: 542056000 },
    { continent: 'South America', population: 392555000 }
];

$(function () {
    $("#pieChartContainer").dxPieChart({
        dataSource: dataSource,
        series: {
            argumentField: 'continent',
            valueField: 'population'
        },
        title: {
            text: 'Population by Continent',
            font: {
                family: 'Zapf-Chancery, cursive'
            }
        }
    });
});

opacity

Specifies a font opacity for the title.

Type: Number
Default Value: undefined

Show Example:
jQuery

In this example, the opacity option of the chart title is set to 0.75.

<div id="pieChartContainer" style="height:400px;max-width:600px;margin: 0px auto"></div>
var dataSource = [
    { continent: 'Africa', population: 1022234000 },
    { continent: 'Antarctica', population: 4490 },
    { continent: 'Asia', population: 4164252000 },
    { continent: 'Australia', population: 29127000 },
    { continent: 'Europe', population: 738199000 },
    { continent: 'North America', population: 542056000 },
    { continent: 'South America', population: 392555000 }
];

$(function () {
    $("#pieChartContainer").dxPieChart({
        dataSource: dataSource,
        series: {
            argumentField: 'continent',
            valueField: 'population'
        },
        title: {
            text: 'Population by Continent',
            font: {
                opacity: 0.75
            }
        }
    });
});

size

Specifies a font size for the title.

Type: Number|String
Default Value: 28

For details on acceptable values, refer to the Font size article.

Show Example:
jQuery

In this example, the chart's title text size is increased to 35 pixels.

<div id="pieChartContainer" style="height:400px;max-width:600px;margin: 0px auto"></div>
var dataSource = [
    { continent: 'Africa', population: 1022234000 },
    { continent: 'Antarctica', population: 4490 },
    { continent: 'Asia', population: 4164252000 },
    { continent: 'Australia', population: 29127000 },
    { continent: 'Europe', population: 738199000 },
    { continent: 'North America', population: 542056000 },
    { continent: 'South America', population: 392555000 }
];

$(function () {
    $("#pieChartContainer").dxPieChart({
        dataSource: dataSource,
        series: {
            argumentField: 'continent',
            valueField: 'population'
        },
        title: {
            text: 'Population by Continent',
            font: {
                size: 35
            }
        }
    });
});

weight

Specifies a font weight for the title.

Type: Number
Default Value: 200

Show Example:
jQuery

In this example, the weight option of the chart's title text is changed to 400.

<div id="pieChartContainer" style="height:400px;max-width:600px;margin: 0px auto"></div>
var dataSource = [
    { continent: 'Africa', population: 1022234000 },
    { continent: 'Antarctica', population: 4490 },
    { continent: 'Asia', population: 4164252000 },
    { continent: 'Australia', population: 29127000 },
    { continent: 'Europe', population: 738199000 },
    { continent: 'North America', population: 542056000 },
    { continent: 'South America', population: 392555000 }
];

$(function () {
    $("#pieChartContainer").dxPieChart({
        dataSource: dataSource,
        series: {
            argumentField: 'continent',
            valueField: 'population'
        },
        title: {
            text: 'Population by Continent',
            font: {
                weight: 400
            }
        }
    });
});