Skip to content

Instantly share code, notes, and snippets.

@tdrach
Last active April 4, 2019 23:18
Show Gist options
  • Save tdrach/ee18ffbd06bbfde14614362e11112feb to your computer and use it in GitHub Desktop.
Save tdrach/ee18ffbd06bbfde14614362e11112feb to your computer and use it in GitHub Desktop.
Funnels Chart
Funnels Chart
First Step
Create Cohort -> Create Cohort Modal
Second Step
Create Cohort -> Create Cohort Modal
Third Step
Create Cohort -> Create Cohort Modal
Create Cohort Modal
Save Cohort -> Confirmation Toast
Cancel -> First Step
Confirmation Toast
Dismiss -> Funnels Chart
function bar(model, height) {
return $("div", {
style: {
width: '40px',
height: `${height}px`,
background: 'blue',
marginRight: '10px',
},
onClick: function () {
model.emit('Create Cohort')
}
})
}
function render(model){
let current_state_name = model.active_states[0].name;
return $("div", {
style: {
display: 'flex',
alignItems: 'bottom'
}
},
bar(model, 100),
bar(model, 30),
bar(model, 60),
bar(model, 20),
model.active_states[0].name);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment