Contents
- Orientation
- Right-to-left (RTL)
- Animation
- Theme
Having trouble getting help?
Contact Support
Contact Support
Customization in Angular Bullet chart component
27 Apr 20247 minutes to read
Orientation
The Bullet Chart can be rendered in different orientations such as Horizontal or Vertical via the orientation
property. By default, the Bullet Chart is rendered in the Horizontal orientation.
import { NgModule } from '@angular/core'
import { BrowserModule } from '@angular/platform-browser'
import { BulletChartModule} from '@syncfusion/ej2-angular-charts'
import { Component } from '@angular/core';
import { AnimationModel } from '@syncfusion/ej2-charts';
@Component({
imports: [
BulletChartModule
],
providers: [ ],
standalone: true,
selector: 'app-container',
template: `<ejs-bulletchart targetField='target' valueField='value' [minimum]='minimum' [maximum]='maximum'
[interval]='interval' [dataSource]='data' [animation]='animation' title='Sales Rate in dollars'
subtitle='(in dollars $)' width='25%' orientation='Vertical'>
<e-bullet-range-collection>
<e-bullet-range end='35' color='#ebebeb'></e-bullet-range>
<e-bullet-range end='70' color='#d8d8d8'></e-bullet-range>
<e-bullet-range end='100' color='#7f7f7f'></e-bullet-range>
</e-bullet-range-collection>
</ejs-bulletchart>`
})
export class AppComponent {
public minimum: number = 0;
public maximum: number = 100;
public interval: number = 20;
public data: Object[] = [
{ value: 55, target: 75 }
];
public animation: AnimationModel = { enable: false };
}
import { bootstrapApplication } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import 'zone.js';
bootstrapApplication(AppComponent).catch((err) => console.error(err));
Right-to-left (RTL)
The Bullet Chart supports the right-to-left rendering that can be enabled by setting the enableRtl
property to true.
import { NgModule } from '@angular/core'
import { BrowserModule } from '@angular/platform-browser'
import { BulletChartModule} from '@syncfusion/ej2-angular-charts'
import { Component } from '@angular/core';
import { AnimationModel } from '@syncfusion/ej2-charts';
@Component({
imports: [
BulletChartModule
],
providers: [ ],
standalone: true,
selector: 'app-container',
template: `<ejs-bulletchart targetField='target' valueField='value' [minimum]='minimum' [maximum]='maximum'
[interval]='interval' [dataSource]='data' [animation]='animation' title='Sales Rate in dollars'
subtitle='(in dollars $)' enableRtl=true>
<e-bullet-range-collection>
<e-bullet-range end='35' color='#ebebeb'></e-bullet-range>
<e-bullet-range end='70' color='#d8d8d8'></e-bullet-range>
<e-bullet-range end='100' color='#7f7f7f'></e-bullet-range>
</e-bullet-range-collection>
</ejs-bulletchart>`
})
export class AppComponent {
public minimum: number = 0;
public maximum: number = 100;
public interval: number = 20;
public data: Object[] = [
{ value: 55, target: 75 }
];
public animation: AnimationModel = { enable: false };
}
import { bootstrapApplication } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import 'zone.js';
bootstrapApplication(AppComponent).catch((err) => console.error(err));
Animation
The actual and the target bar supports the linear animation via the animation
setting. The speed and the delay are controlled using the duration
and delay
properties respectively.
import { NgModule } from '@angular/core'
import { BrowserModule } from '@angular/platform-browser'
import { BulletChartModule} from '@syncfusion/ej2-angular-charts'
import { Component } from '@angular/core';
import { AnimationModel } from '@syncfusion/ej2-charts';
@Component({
imports: [
BulletChartModule
],
providers: [ ],
standalone: true,
selector: 'app-container',
template: `<ejs-bulletchart valueField='value' targetField='target' [minimum]='minimum' [maximum]='maximum'
[interval]='interval' [dataSource]='data' [animation]='animation'>
<e-bullet-range-collection>
<e-bullet-range end='35' color='#ebebeb'></e-bullet-range>
<e-bullet-range end='70' color='#d8d8d8'></e-bullet-range>
<e-bullet-range end='100' color='#7f7f7f'></e-bullet-range>
</e-bullet-range-collection>
</ejs-bulletchart>`
})
export class AppComponent {
public minimum: number = 0;
public maximum: number = 100;
public interval: number = 20;
public data: Object[] = [
{ value: 55, target: 75 }
];
public animation: AnimationModel = { enable: true };
}
import { bootstrapApplication } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import 'zone.js';
bootstrapApplication(AppComponent).catch((err) => console.error(err));
Theme
The Bullet Chart supports different type of themes via the theme
property.
import { NgModule } from '@angular/core'
import { BrowserModule } from '@angular/platform-browser'
import { BulletChartModule} from '@syncfusion/ej2-angular-charts'
import { Component } from '@angular/core';
import { AnimationModel } from '@syncfusion/ej2-charts';
@Component({
imports: [
BulletChartModule
],
providers: [ ],
standalone: true,
selector: 'app-container',
template: `<ejs-bulletchart targetField='target' valueField='value' [minimum]='minimum' [maximum]='maximum'
[interval]='interval' [dataSource]='data' [animation]='animation' title='Sales Rate in dollars'
subtitle='(in dollars $)' theme='HighContrast'>
<e-bullet-range-collection>
<e-bullet-range end='35' color='#ebebeb'></e-bullet-range>
<e-bullet-range end='70' color='#d8d8d8'></e-bullet-range>
<e-bullet-range end='100' color='#7f7f7f'></e-bullet-range>
</e-bullet-range-collection>
</ejs-bulletchart>`
})
export class AppComponent {
public minimum: number = 0;
public maximum: number = 100;
public interval: number = 20;
public data: Object[] = [
{ value: 55, target: 75 }
];
public animation: AnimationModel = { enable: false };
}
import { bootstrapApplication } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import 'zone.js';
bootstrapApplication(AppComponent).catch((err) => console.error(err));