- Title
- Subtitle
- Title and SubTitle Position
- Title Customization
- SubTitle Customization
Contact Support
Title in Vue Bullet chart component
13 Jun 202424 minutes to read
Title
The title of the Bullet Chart displays the information about the data plotted by specifying it in the title
property.
<template>
<div>
<ejs-bulletchart id="bulletChart" :dataSource="data" valueField="value" targetField="target" :minimum="minimum"
:maximum="maximum" :interval="interval" title="Sales Rate">
<e-bullet-range-collection>
<e-bullet-range end="35" color="red"></e-bullet-range>
<e-bullet-range end="50" color="blue"></e-bullet-range>
<e-bullet-range end="100" color="green"></e-bullet-range>
</e-bullet-range-collection>
</ejs-bulletchart>
</div>
</template>
<script setup>
import { BulletChartComponent as EjsBulletchart, BulletRangeCollectionDirective as EBulletRangeCollection, BulletRangeDirective as EBulletRange } from '@syncfusion/ej2-vue-charts';
const data = [{ value: 55, target: 75 }];
const minimum = 0;
const maximum = 100;
const interval = 20;
</script>
<template>
<div>
<ejs-bulletchart id="bulletChart"
:dataSource="data"
valueField="value"
targetField="target"
:minimum="minimum"
:maximum="maximum"
:interval="interval"
title="Sales Rate"
>
<e-bullet-range-collection>
<e-bullet-range end="35" color="red"></e-bullet-range>
<e-bullet-range end="50" color="blue"></e-bullet-range>
<e-bullet-range end="100" color="green"></e-bullet-range>
</e-bullet-range-collection>
</ejs-bulletchart>
</div>
</template>
<script>
import { BulletChartComponent, BulletRangeCollectionDirective, BulletRangeDirective } from '@syncfusion/ej2-vue-charts';
export default {
name: "App",
components: {
"ejs-bulletchart": BulletChartComponent,
"e-bullet-range-collection": BulletRangeCollectionDirective,
"e-bullet-range": BulletRangeDirective
},
data () {
return {
data: [{ value: 55, target: 75 }],
minimum: 0, maximum: 100, interval: 20
}
}
}
</script>
Subtitle
To show additional information about the data plotted, the Bullet Chart can also be given a subtitle using the subtitle
property.
<template>
<div>
<ejs-bulletchart id="bulletChart" :dataSource="data" valueField="value" targetField="target" :minimum="minimum"
:maximum="maximum" :interval="interval" title="Sales Rate in dollars" labelFormat="${value}"
subtitle="(in dollars $)">
<e-bullet-range-collection>
<e-bullet-range end="35" color="red"></e-bullet-range>
<e-bullet-range end="50" color="blue"></e-bullet-range>
<e-bullet-range end="100" color="green"></e-bullet-range>
</e-bullet-range-collection>
</ejs-bulletchart>
</div>
</template>
<script setup>
import { BulletChartComponent as EjsBulletchart, BulletRangeCollectionDirective as EBulletRangeCollection, BulletRangeDirective as EBulletRange } from '@syncfusion/ej2-vue-charts';
const data = [{ value: 55, target: 45 }];
const minimum = 0;
const maximum = 100;
const interval = 20;
</script>
<template>
<div>
<ejs-bulletchart id="bulletChart" :dataSource="data" valueField="value" targetField="target" :minimum="minimum"
:maximum="maximum" :interval="interval" title="Sales Rate in dollars" labelFormat="${value}"
subtitle="(in dollars $)">
<e-bullet-range-collection>
<e-bullet-range end="35" color="red"></e-bullet-range>
<e-bullet-range end="50" color="blue"></e-bullet-range>
<e-bullet-range end="100" color="green"></e-bullet-range>
</e-bullet-range-collection>
</ejs-bulletchart>
</div>
</template>
<script>
import { BulletChartComponent, BulletRangeCollectionDirective, BulletRangeDirective } from '@syncfusion/ej2-vue-charts';
export default {
name: "App",
components: {
"ejs-bulletchart": BulletChartComponent,
"e-bullet-range-collection": BulletRangeCollectionDirective,
"e-bullet-range": BulletRangeDirective
},
data() {
return {
data: [{ value: 55, target: 45 }],
minimum: 0, maximum: 100, interval: 20
}
}
}
</script>
Title and SubTitle Position
The title and the subtitle positions can be customized using the titlePosition
property. Possible positions are Left, Right, Top, and Bottom.
Position as Left
By setting the titlePosition
to Left, you can display the title and subtitle at the left side of the Bullet Chart.
<template>
<div>
<ejs-bulletchart id="bulletChart" :dataSource="data" valueField="value" targetField="target" :minimum="minimum"
:maximum="maximum" :interval="interval" title="Sales Rate in dollars" titlePosition="Left" labelFormat="${value}"
subtitle="(in dollars $)">
<e-bullet-range-collection>
<e-bullet-range end="35" color="red"></e-bullet-range>
<e-bullet-range end="50" color="blue"></e-bullet-range>
<e-bullet-range end="100" color="green"></e-bullet-range>
</e-bullet-range-collection>
</ejs-bulletchart>
</div>
</template>
<script setup>
import { BulletChartComponent as EjsBulletchart, BulletRangeCollectionDirective as EBulletRangeCollection, BulletRangeDirective as EBulletRange } from '@syncfusion/ej2-vue-charts';
const data = [{ value: 55, target: 45 }];
const minimum = 0;
const maximum = 100;
const interval = 20;
</script>
<template>
<div>
<ejs-bulletchart id="bulletChart" :dataSource="data" valueField="value" targetField="target" :minimum="minimum"
:maximum="maximum" :interval="interval" title="Sales Rate in dollars" titlePosition="Left" labelFormat="${value}"
subtitle="(in dollars $)">
<e-bullet-range-collection>
<e-bullet-range end="35" color="red"></e-bullet-range>
<e-bullet-range end="50" color="blue"></e-bullet-range>
<e-bullet-range end="100" color="green"></e-bullet-range>
</e-bullet-range-collection>
</ejs-bulletchart>
</div>
</template>
<script>
import { BulletChartComponent, BulletRangeCollectionDirective, BulletRangeDirective } from '@syncfusion/ej2-vue-charts';
export default {
name: "App",
components: {
"ejs-bulletchart": BulletChartComponent,
"e-bullet-range-collection": BulletRangeCollectionDirective,
"e-bullet-range": BulletRangeDirective
},
data() {
return {
data: [{ value: 55, target: 45 }],
minimum: 0, maximum: 100, interval: 20
}
}
}
</script>
Position as Right
By setting the titlePosition
to Right, you can display the title and subtitle at the right side of the Bullet Chart.
<template>
<div>
<ejs-bulletchart id="bulletChart" :dataSource="data" valueField="value" targetField="target" :minimum="minimum"
:maximum="maximum" :interval="interval" title="Sales Rate in dollars" titlePosition="Right" labelFormat="${value}"
subtitle="(in dollars $)">
<e-bullet-range-collection>
<e-bullet-range end="35" color="red"></e-bullet-range>
<e-bullet-range end="50" color="blue"></e-bullet-range>
<e-bullet-range end="100" color="green"></e-bullet-range>
</e-bullet-range-collection>
</ejs-bulletchart>
</div>
</template>
<script setup>
import { BulletChartComponent as EjsBulletchart, BulletRangeCollectionDirective as EBulletRangeCollection, BulletRangeDirective as EBulletRange } from '@syncfusion/ej2-vue-charts';
const data = [{ value: 55, target: 45 }];
const minimum = 0;
const maximum = 100;
const interval = 20;
</script>
<template>
<div>
<ejs-bulletchart id="bulletChart" :dataSource="data" valueField="value" targetField="target" :minimum="minimum"
:maximum="maximum" :interval="interval" title="Sales Rate in dollars" titlePosition="Right" labelFormat="${value}"
subtitle="(in dollars $)">
<e-bullet-range-collection>
<e-bullet-range end="35" color="red"></e-bullet-range>
<e-bullet-range end="50" color="blue"></e-bullet-range>
<e-bullet-range end="100" color="green"></e-bullet-range>
</e-bullet-range-collection>
</ejs-bulletchart>
</div>
</template>
<script>
import { BulletChartComponent, BulletRangeCollectionDirective, BulletRangeDirective } from '@syncfusion/ej2-vue-charts';
export default {
name: "App",
components: {
"ejs-bulletchart": BulletChartComponent,
"e-bullet-range-collection": BulletRangeCollectionDirective,
"e-bullet-range": BulletRangeDirective
},
data() {
return {
data: [{ value: 55, target: 45 }],
minimum: 0, maximum: 100, interval: 20
}
}
}
</script>
Position as Top
By setting the titlePosition
to Top, you can display the title and subtitle at the top of the Bullet Chart. The default title and subtitle positions of the Bullet Chart is Top.
<template>
<div>
<ejs-bulletchart id="bulletChart" :dataSource="data" valueField="value" targetField="target" :minimum="minimum"
:maximum="maximum" :interval="interval" title="Sales Rate in dollars" titlePosition="Top" labelFormat="${value}"
subtitle="(in dollars $)">
<e-bullet-range-collection>
<e-bullet-range end="35" color="red"></e-bullet-range>
<e-bullet-range end="50" color="blue"></e-bullet-range>
<e-bullet-range end="100" color="green"></e-bullet-range>
</e-bullet-range-collection>
</ejs-bulletchart>
</div>
</template>
<script setup>
import { BulletChartComponent as EjsBulletchart, BulletRangeCollectionDirective as EBulletRangeCollection, BulletRangeDirective as EBulletRange } from '@syncfusion/ej2-vue-charts';
const data = [{ value: 55, target: 45 }];
const minimum = 0;
const maximum = 100;
const interval = 20;
</script>
<template>
<div>
<ejs-bulletchart id="bulletChart" :dataSource="data" valueField="value" targetField="target" :minimum="minimum"
:maximum="maximum" :interval="interval" title="Sales Rate in dollars" titlePosition="Top" labelFormat="${value}"
subtitle="(in dollars $)">
<e-bullet-range-collection>
<e-bullet-range end="35" color="red"></e-bullet-range>
<e-bullet-range end="50" color="blue"></e-bullet-range>
<e-bullet-range end="100" color="green"></e-bullet-range>
</e-bullet-range-collection>
</ejs-bulletchart>
</div>
</template>
<script>
import { BulletChartComponent, BulletRangeCollectionDirective, BulletRangeDirective } from '@syncfusion/ej2-vue-charts';
export default {
name: "App",
components: {
"ejs-bulletchart": BulletChartComponent,
"e-bullet-range-collection": BulletRangeCollectionDirective,
"e-bullet-range": BulletRangeDirective
},
data() {
return {
data: [{ value: 55, target: 45 }],
minimum: 0, maximum: 100, interval: 20
}
}
}
</script>
Position as Bottom
By setting the titlePosition
to Bottom, you can display the title and subtitle at the bottom of the Bullet Chart.
<template>
<div>
<ejs-bulletchart id="bulletChart" :dataSource="data" valueField="value" targetField="target" :minimum="minimum"
:maximum="maximum" :interval="interval" title="Sales Rate in dollars" titlePosition="Bottom"
labelFormat="${value}" subtitle="(in dollars $)">
<e-bullet-range-collection>
<e-bullet-range end="35" color="red"></e-bullet-range>
<e-bullet-range end="50" color="blue"></e-bullet-range>
<e-bullet-range end="100" color="green"></e-bullet-range>
</e-bullet-range-collection>
</ejs-bulletchart>
</div>
</template>
<script setup>
import { BulletChartComponent as EjsBulletchart, BulletRangeCollectionDirective as EBulletRangeCollection, BulletRangeDirective as EBulletRange } from '@syncfusion/ej2-vue-charts';
const data = [{ value: 55, target: 45 }];
const minimum = 0;
const maximum = 100;
const interval = 20;
</script>
<template>
<div>
<ejs-bulletchart id="bulletChart"
:dataSource="data"
valueField="value"
targetField="target"
:minimum="minimum"
:maximum="maximum"
:interval="interval"
title="Sales Rate in dollars"
titlePosition="Bottom"
labelFormat="${value}"
subtitle="(in dollars $)"
>
<e-bullet-range-collection>
<e-bullet-range end="35" color="red"></e-bullet-range>
<e-bullet-range end="50" color="blue"></e-bullet-range>
<e-bullet-range end="100" color="green"></e-bullet-range>
</e-bullet-range-collection>
</ejs-bulletchart>
</div>
</template>
<script>
import { BulletChartComponent, BulletRangeCollectionDirective, BulletRangeDirective } from '@syncfusion/ej2-vue-charts';
export default {
name: "App",
components: {
"ejs-bulletchart": BulletChartComponent,
"e-bullet-range-collection": BulletRangeCollectionDirective,
"e-bullet-range": BulletRangeDirective
},
data () {
return {
data: [{ value: 55, target: 45 }],
minimum: 0, maximum: 100, interval: 20
}
}
}
</script>
Title Customization
The title color, opacity, font size, font family, font weight, and font style can be customized using the titleStyle
property.
<template>
<div>
<ejs-bulletchart id="bulletChart" :dataSource="data" valueField="value" targetField="target" :minimum="minimum"
:maximum="maximum" :interval="interval" title="Sales Rate in dollars" labelFormat="${value}"
:titleStyle="titleStyle" subtitle="(in dollars $)">
<e-bullet-range-collection>
<e-bullet-range end="35" color="red"></e-bullet-range>
<e-bullet-range end="50" color="blue"></e-bullet-range>
<e-bullet-range end="100" color="green"></e-bullet-range>
</e-bullet-range-collection>
</ejs-bulletchart>
</div>
</template>
<script setup>
import { BulletChartComponent as EjsBulletchart, BulletRangeCollectionDirective as EBulletRangeCollection, BulletRangeDirective as EBulletRange } from '@syncfusion/ej2-vue-charts';
const data = [{ value: 55, target: 45 }];
const minimum = 0;
const maximum = 100;
const interval = 20;
const titleStyle = { size: '22px', color: 'red', fontFamily: 'cursive', fontWeight: 'Bold' };
</script>
<template>
<div>
<ejs-bulletchart id="bulletChart" :dataSource="data" valueField="value" targetField="target" :minimum="minimum"
:maximum="maximum" :interval="interval" title="Sales Rate in dollars" labelFormat="${value}"
:titleStyle="titleStyle" subtitle="(in dollars $)">
<e-bullet-range-collection>
<e-bullet-range end="35" color="red"></e-bullet-range>
<e-bullet-range end="50" color="blue"></e-bullet-range>
<e-bullet-range end="100" color="green"></e-bullet-range>
</e-bullet-range-collection>
</ejs-bulletchart>
</div>
</template>
<script>
import { BulletChartComponent, BulletRangeCollectionDirective, BulletRangeDirective } from '@syncfusion/ej2-vue-charts';
export default {
name: "App",
components: {
"ejs-bulletchart": BulletChartComponent,
"e-bullet-range-collection": BulletRangeCollectionDirective,
"e-bullet-range": BulletRangeDirective
},
data() {
return {
data: [{ value: 55, target: 45 }],
minimum: 0, maximum: 100, interval: 20,
titleStyle: { size: '22px', color: 'red', fontFamily: 'cursive', fontWeight: 'Bold' }
}
}
}
</script>
SubTitle Customization
The sub-title color, opacity, font size, font family, font weight, and font style can be customized using the subtitleStyle
property.
<template>
<div>
<ejs-bulletchart id="bulletChart" :dataSource="data" valueField="value" targetField="target" :minimum="minimum"
:maximum="maximum" :interval="interval" title="Sales Rate in dollars" labelFormat="${value}"
subtitle="(in dollars $)" :subtitleStyle="subtitleStyle">
<e-bullet-range-collection>
<e-bullet-range end="35" color="red"></e-bullet-range>
<e-bullet-range end="50" color="blue"></e-bullet-range>
<e-bullet-range end="100" color="green"></e-bullet-range>
</e-bullet-range-collection>
</ejs-bulletchart>
</div>
</template>
<script setup>
import { BulletChartComponent as EjsBulletchart, BulletRangeCollectionDirective as EBulletRangeCollection, BulletRangeDirective as EBulletRange } from '@syncfusion/ej2-vue-charts';
const data = [{ value: 55, target: 45 }];
const minimum = 0;
const maximum = 100;
const interval = 20;
const subtitleStyle = { size: '22px', color: 'red', fontFamily: 'cursive', fontWeight: 'Bold' };
</script>
<template>
<div>
<ejs-bulletchart id="bulletChart" :dataSource="data" valueField="value" targetField="target" :minimum="minimum"
:maximum="maximum" :interval="interval" title="Sales Rate in dollars" labelFormat="${value}"
subtitle="(in dollars $)" :subtitleStyle="subtitleStyle">
<e-bullet-range-collection>
<e-bullet-range end="35" color="red"></e-bullet-range>
<e-bullet-range end="50" color="blue"></e-bullet-range>
<e-bullet-range end="100" color="green"></e-bullet-range>
</e-bullet-range-collection>
</ejs-bulletchart>
</div>
</template>
<script>
import { BulletChartComponent, BulletRangeCollectionDirective, BulletRangeDirective } from '@syncfusion/ej2-vue-charts';
export default {
name: "App",
components: {
"ejs-bulletchart": BulletChartComponent,
"e-bullet-range-collection": BulletRangeCollectionDirective,
"e-bullet-range": BulletRangeDirective
},
data() {
return {
data: [{ value: 55, target: 45 }],
minimum: 0, maximum: 100, interval: 20,
subtitleStyle: { size: '22px', color: 'red', fontFamily: 'cursive', fontWeight: 'Bold' }
}
}
}
</script>