Skip to content

Instantly share code, notes, and snippets.

View ronakrrb's full-sized avatar

Ronak Bhandari ronakrrb

View GitHub Profile
@ronakrrb
ronakrrb / es5.js
Created May 24, 2022 11:40 — forked from danieliser/es5.js
Convert Hex Color to rgba with opacity
/**
* ECMA2015
*/
function convertHex(hexCode, opacity = 1){
var hex = hexCode.replace('#', '');
if (hex.length === 3) {
hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
}
@ronakrrb
ronakrrb / Funnel
Last active April 17, 2018 15:50
Funnel Chart Layout built in d3.js
This examples shows the sales funnel in an organisation i.e.
1. Number of leads created.
2. Number of leads to whom phone calls were made.
3. Number of leads pitched to whom phone calls were made.
4. Number of leads whom were pitched, negotiated.
5. Number of final closure.
@ronakrrb
ronakrrb / Pyramid
Last active June 10, 2023 14:33
Pyramid Chart Layout built in d3.js
Maslow's hierarchy of needs is often portrayed in the shape of a pyramid with the largest,
most fundamental levels of needs at the bottom and the need for self-actualization at the top.
While the pyramid has become the de facto way to represent the hierarchy, Maslow himself
never used a pyramid to describe these levels in any of his writings on the subject.
Reference: http://en.wikipedia.org/wiki/Maslow%27s_hierarchy_of_needs