Dimensions
13 Feb 20195 minutes to read
Set size in percentage
You can customize the pivot chart dimension under the size
property by setting the width and height of the widget in percentage.
<body>
<div id="PivotChart1" style="width: 100%; height: 450px" ></div>
<script type="text/javascript">
//Datasource
....
....
$(function () {
$("#PivotChart1").ejPivotChart({
....
....
//Setting size to Chart container
size: {
height: "80%",
width: "80%"
}
});
});
</script>
</body>
Set size in pixels
You can customize the pivot chart dimension under the size
property by setting the width and height of the widget in pixels.
<body>
<div id="PivotChart1" style="width: 950px; height: 460px" ></div>
<script type="text/javascript">
//Datasource
....
....
$(function () {
$("#PivotChart1").ejPivotChart({
....
....
//Setting size to Chart container
size: {
height: "460px",
width: "950px"
}
});
});
</script>
</body>
Responsive
The pivot chart widget supports responsive rendering based on the target device (desktop and tablet) resolution. It supports resolution upto 1024x600. You can enable the responsiveness in the pivot chart by setting the isResponsive
property to true.
<body>
<div id="PivotChart1" style="min-width: 950px; min-height: 460px;width: 100%" ></div>
<script type="text/javascript">
//Datasource
....
....
$(function () {
$("#PivotChart1").ejPivotChart({
....
....
//Enable responsiveness to change the Chart size dynamically.
isResponsive: true,
size: {
height: "460px",
width: "950px"
}
});
});
</script>
</body>
Normal View
ResponsiveView