)
We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Essential JS2

Syncfusion jQuery based widgets are no longer in active development. Switch to our pure JavaScript based next generation Essential JS 2 library.

Syncfusion Feedback

What are the rendering modes available for pyramid series in the Chart?

Platform: jQuery |
Control: ejChart |
Published Date: May 25, 2015 |
Last Revised Date: July 1, 2019

Essential Chart supports rendering of the pyramid series in surface and linear mode by using the pyramidMode property of series.

Linear Mode 

In Linear Mode, the pyramid series is rendered such that the height of a pyramid segment is proportional to the y value of the point represented by that segment. To render pyramid series in Linear Mode, you can set the pyramidMode property to linear.

For example, consider a pyramid series having two points with y values [50, 50], then the pyramid series is rendered such that the height of the two segments is proportional to their y values. In this case, two pyramid segments are drawn such that the height of each segment is 50% of pyramid height. In general, when y values of two points in the  pyramid series are same, then the height of their pyramid segments are equal. Refer to the following code example.

JS

$("#container").ejChart({
    series: [{
        type: 'pyramid',
        pyramidMode: 'linear',
        points: [
            {x:1, y:50},
            {x:2, y:50}
        ]
    }]
});

 

The following screenshot displays the pyramid series with two points having the same y values in linear mode. Since both points have same y values, height of the two pyramid segments are equal.

Linear Mode

JS Playground sample link: Linear Mode

 

Surface Mode

In Surface Mode, the pyramid series is rendered such that the surface area of a pyramid segment is proportional to the y value of the point represented by that segment. To render pyramid series in Surface Mode, you can set the pyramidMode property to surface.

For example, consider a pyramid series having two points in the surface mode with y values [50, 50]. Pyramid series is rendered such that the area of the segment is proportional to the y values. In this case, both the segments consume 50% of the total surface area of the pyramid chart. In general, when y values of two points in the pyramid series are equal, then the area of their pyramid segments are equal in surface mode. Refer to the following code example.

JS

$("#container").ejChart({
    series: [{
        type: 'pyramid',
        pyramidMode: 'surface',
        points: [
            {x:1, y:50},
            {x:2, y:50}
        ]
    }]
});

 

The following screenshot displays a pyramid series in surface mode with two points having the same y values.

Surface Mode

JS Playground sample link: Surface Mode

ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon