-
-
Couldn't load subscription status.
- Fork 112
Funnel support #934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Funnel support #934
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "data": [ | ||
| { | ||
| "type": "funnel", | ||
| "y": ["Lead", "Pipeline", "Proposal", "Negotiation", "Closed (Won)"], | ||
| "x": [ 610, 432, 231, 103, 54 ] | ||
| } | ||
| ] | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "data": [ | ||
| { | ||
| "type": "funnelarea", | ||
| "labels": ["Lead", "Pipeline", "Proposal", "Negotiation", "Closed (Won)"], | ||
| "values": [ 610, 432, 231, 103, 54 ] | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -64,7 +64,7 @@ class SubplotAccordion extends Component { | |
| // of right type that have attr 'subplot': 'ternary' in their data. | ||
|
|
||
| /** | ||
| Example: | ||
| Example: | ||
| { | ||
| "data": [ | ||
| { | ||
|
|
@@ -126,7 +126,9 @@ class SubplotAccordion extends Component { | |
| data.forEach((d, i) => { | ||
| if ( | ||
| (d.type === 'pie' && d.values) || | ||
| ['pie', 'table', 'sunburst', 'sankey', 'parcoords', 'parcats'].includes(d.type) | ||
| ['pie', 'table', 'sunburst', 'sankey', 'parcoords', 'parcats', 'funnelarea'].includes( | ||
| d.type | ||
| ) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the legend is merged, not overlapping, just like with a multi-pie scenario. |
||
| ) { | ||
| counter[d.type]++; | ||
| const currentCount = counter[d.type]; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,12 +15,10 @@ class TraceMarkerSection extends Component { | |
| setLocals(context) { | ||
| const _ = this.context.localize; | ||
| const traceType = context.fullContainer.type; | ||
| if (['bar', 'histogram'].includes(traceType)) { | ||
| if (['bar', 'histogram', 'funnel', 'waterfall'].includes(traceType)) { | ||
| this.name = _('Bars'); | ||
| } else if (traceType === 'pie') { | ||
| this.name = _('Pie Segments'); | ||
| } else if (traceType === 'sunburst') { | ||
| this.name = _('Sunburst Segments'); | ||
| } else if (['funnelarea', 'pie', 'sunburst'].includes(traceType)) { | ||
| this.name = _('Segments'); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
| } else { | ||
| this.name = _('Points'); | ||
| } | ||
|
|
||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a general, more plot.js type question. Why are the axes for funnel (x/y) and funnelarea (labels/values), why couldn't they both have been named (labels/values) ? I feel like that would have been easier understand for a business type chart.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah this is because
funnelis based onbarand is on cartesian axes, butfunnelareais based onpieand has no axes or orientation.