A newer version of this page is available. Switch to the current version.

JavaScript/jQuery Sankey - title

Configures the UI component's title.

Type: viz/core/base_widget:BaseWidgetTitle

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

Specifies font properties for the title.

Type:

Object

The following code sample illustrates how to set this property:

jQuery
index.js
$(function() {
    $("#sankeyContainer").dxSankey({
        // ...
        title: {
            font: {
                color: "black"
            }
        }
    });
});
Angular
app.component.html
app.component.ts
app.module.ts
<dx-sankey ... >
    <dxo-title ... >
        <dxo-font
            color="black">
        </dxo-font>
    </dxo-title>
</dx-sankey>
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 { DxSankeyModule } from 'devextreme-angular';

@NgModule({
    declarations: [
        AppComponent
    ],
    imports: [
        BrowserModule,
        DxSankeyModule
    ],
    providers: [ ],
    bootstrap: [AppComponent]
})
export class AppModule { }
Vue
App.vue
<template>
    <DxSankey ... >
        <DxTitle ... >
            <DxFont
                color="black"
            />
        </DxTitle>
    </DxSankey>
</template>

<script>
import DxSankey, {
    DxTitle,
    DxFont
} from 'devextreme-vue/sankey';

export default {
    components: {
        DxSankey,
        DxTitle,
        DxFont
    },
    // ...
}
</script>
React
App.js
import React from 'react';

import Sankey, {
    Title,
    Font
} from 'devextreme-react/sankey';

class App extends React.Component {
    render() {
        return (
            <Sankey ... >
                <Title ... >
                    <Font color="black" />
                </Title>
            </Sankey>
        );
    }
}
export default App;
ASP.NET MVC Controls
Razor C#
@(Html.DevExtreme().Sankey()
    // ...
    .Title(t => t
        .Font(f => f.Color("black"))
    )
)

horizontalAlignment

Specifies the title's alignment in a horizontal direction.

Default Value: 'center'

See Also

margin

Generates space around the title.

Type:

Number

|

Object

Default Value: 10

Use the fields of this object to set the required values for the left, right, top and bottom title margins separately. If title margins suppose to be equal, assign a numeric value directly to the margin property.

placeholderSize

Reserves a pixel-measured space for the title.

Type:

Number

Default Value: undefined

subtitle

Configures the UI component's subtitle.

Type:

Object

|

String

If you need to specify the subtitle's text only, assign it directly to this property. Otherwise, set this property to an object with the text and other fields specified.

text

Specifies the title's text.

Type:

String

Default Value: null

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.

Type:

TextOverflow

Default Value: 'ellipsis'

verticalAlignment

Specifies the title's alignment in a vertical direction.

Type:

VerticalEdge

Default Value: 'top'

See Also

wordWrap

Specifies how to wrap the title if it does not fit into a single line.

Type:

WordWrap

Default Value: 'normal'

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.