Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
Edit: I updated this so the call back function is easier and less retarded.
Thank you for a nice project. It helped me out a lot.
I added some stuff to your funnel code that you and others might find useful too so if you want you can use it in your project.
I added optional custom colors to the project, callback capability and the option to make the trapezoids of equal size.
Sample use:
function FunnelCallback(inputString) {
switch (inputString) {
case 'data 1':
DoStuffs1();
break;
case 'data 2':
DoStuffs2();
break;
case 'data 3':
DoStuffs3();
break;
case 'data 4':
DoStuffs4();
break;
default:
alert('Funnel callback not matching input');
break;
}
}
function MakeAFunnel() {
var data = [['data 1', 1711, '#4c689f'], ['data 2', 171, '#a7d04c'], ['data 3', 51, '#4cbde8'], ['Data 4', 11, '#9cd8ef']];
var chart = new FunnelChart({
data: data,
width: 450,
height: 550,
bottomPct: 1 / 3,
callBack: FunnelCallback,
equalSizedFunnelSteps: true
});
chart.draw('#funnelContainer', 2);
}
This is my first pull request so I apologize something does not make any sense for some reason...
Best,
Peter.