Dimensions in EJ 1 Angular PivotChart
28 Sep 2017 / 2 minutes to read
Set size in percentage
You can customize the PivotChart dimension by setting the width and height of the control in percentage.
<ej-pivotchart [size]="size">
</ej-pivotchart>
//..
export class PivotChartComponent {
public size;
constructor() {
//..
this.size = { height: "80%", width: "80%" }; //Set size to Chart container
}
}
ej-pivotchart {
width:100%;
height:450px;
}
Set size in pixels
You can customize the PivotChart dimension by setting the width and height of the control in pixels.
<ej-pivotchart [size]="size">
</ej-pivotchart>
//..
export class PivotChartComponent {
public size;
constructor() {
//..
this.size = { height: "950px", width: "540px" }; //Set size to Chart container
}
}
ej-pivotchart {
width:950px;
height:450px;
}
Responsive
PivotChart control supports responsive rendering based on the target device (desktop & tablet) resolution. It supports resolution upto 1024x600. You can enable responsiveness in PivotChart by setting isResponsive
property to true.
<ej-pivotchart [isResponsive]="true" [size]="size">
</ej-pivotchart>
//..
export class PivotChartComponent {
public size;
constructor() {
//..
this.size = { height: "950px", width: "540px" }; //Set size to Chart container
}
}
ej-pivotchart {
min-width:525px;
min-height:460px;
width: 100%;
height:450px;
}
Normal View
ResponsiveView
Was this page helpful?
Yes
No
Thank you for your feedback!
Thank you for your feedback and comments. We will rectify this as soon as possible!
An unknown error has occurred. Please try again.
Help us improve this page