All docs
V20.2
24.1
23.2
23.1
22.2
22.1
21.2
21.1
20.2
20.1
19.2
The page you are viewing does not exist in version 19.2.
19.1
The page you are viewing does not exist in version 19.1.
18.2
The page you are viewing does not exist in version 18.2.
18.1
The page you are viewing does not exist in version 18.1.
17.2
The page you are viewing does not exist in version 17.2.
A newer version of this page is available. Switch to the current version.

jQuery Sankey - Title and Subtitle

Titles and subtitles are textual elements that provide an overview of what the UI component visualizes.

Sankey Title and Subtitle

The title object configures the title; the title.subtitle object configures the subtitle.

jQuery
JavaScript
$(function() {
    $("#sankeyContainer").dxSankey({
        // ...
        title: {
            text: "I am the Title",
            subtitle: {
                text: "I am the Subtitle"
            }
        }
    });
});
Angular
HTML
TypeScript
<dx-sankey ... >
    <dxo-title
        text="I am the Title">
        <dxo-subtitle
            text="I am the Subtitle">
        </dxo-subtitle>
    </dxo-title>
</dx-sankey>
import { DxSankeyModule } from "devextreme-angular";
// ...
export class AppComponent {
    // ...
}
@NgModule({
    imports: [
        // ...
        DxSankeyModule
    ],
    // ...
})
Vue
App.vue
<template> 
    <DxSankey ... >
        <DxTitle text="I am the Title">
            <DxSubtitle text="I am the Subtitle" />
        </DxTitle>
    </DxSankey>
</template>

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

export default {
    components: {
        DxSankey,
        DxTitle,
        DxSubtitle
    }
}
</script>
React
App.js
import React from 'react';
import Sankey, { Title, Subtitle } from 'devextreme-react/sankey';

class App extends React.Component {
    render() {
        return (
            <Sankey ... >
                <Title text="I am the Title">
                    <Subtitle text="I am the Subtitle" />
                </Title>
            </Sankey>
        )
    }
}

export default App;

You can set the title's text more concisely if you assign it directly to the title property. This is useful if you do not want to change the title's default settings and do not need a subtitle.

jQuery
JavaScript
$(function() {
    $("#sankeyContainer").dxSankey({
        // ...
        title: "I am the Title"
    });
});
Angular
HTML
TypeScript
<dx-sankey ...
    text="I am the Title">
</dx-sankey>
import { DxSankeyModule } from "devextreme-angular";
// ...
export class AppComponent {
    // ...
}
@NgModule({
    imports: [
        // ...
        DxSankeyModule
    ],
    // ...
})
Vue
App.vue
<template> 
    <DxSankey title="I am the Title" />
</template>

<script>
import DxSankey from 'devextreme-vue/sankey';

export default {
    components: {
        DxSankey
    }
}
</script>
React
App.js
import React from 'react';
import Sankey from 'devextreme-react/sankey';

class App extends React.Component {
    render() {
        return (
            <Sankey title="I am the Title" />
        )
    }
}

export default App;

View Demo

See Also