JavaScript/jQuery PieChart - title
The UI component's title is a short text that usually indicates what is visualized. If you need to specify the title's text only, assign it directly to the title property. Otherwise, set this property to an object with the text and other fields specified.
The title can be accompanied by a subtitle elaborating on the visualized subject using the title.subtitle object.
font
The following code sample illustrates how to set this property:
jQuery
$(function() { $("#pieChartContainer").dxPieChart({ // ... title: { font: { color: "black" } } }); });
Angular
<dx-pie-chart ... > <dxo-title ... > <dxo-font color="black"> </dxo-font> </dxo-title> </dx-pie-chart>
import { Component } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { // ... }
import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { AppComponent } from './app.component'; import { DxPieChartModule } from 'devextreme-angular'; @NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule, DxPieChartModule ], providers: [ ], bootstrap: [AppComponent] }) export class AppModule { }
Vue
<template> <DxPieChart ... > <DxTitle ... > <DxFont color="black" /> </DxTitle> </DxPieChart> </template> <script> import DxPieChart, { DxTitle, DxFont } from 'devextreme-vue/pie-chart'; export default { components: { DxPieChart, DxTitle, DxFont }, // ... } </script>
React
import React from 'react'; import PieChart, { Title, Font } from 'devextreme-react/pie-chart'; class App extends React.Component { render() { return ( <PieChart ... > <Title ... > <Font color="black" /> </Title> </PieChart> ); } } export default App;
ASP.NET MVC Controls
@(Html.DevExtreme().PieChart() // ... .Title(t => t .Font(f => f.Color("black")) ) )
textOverflow
Specifies what to do with the title when it overflows the allocated space after applying wordWrap: hide, truncate it and display an ellipsis, or do nothing.
wordWrap
The following modes are available:
"normal"
Text breaks only at allowed breakpoints (for example, a space between two words)."breakWord"
Words can be broken if there are no available breakpoints in the line."none"
Word wrap is disabled.
If the text overflows the container even after word wrap, the UI component applies the textOverflow property.