-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Lens] Pie and treemap charts #55477
Conversation
Pinging @elastic/kibana-app (Team:KibanaApp) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@elasticmachine merge upstream |
} | ||
const metricColumn = firstTable.columns.find(c => c.id === metric)!; | ||
const percentFormatter = | ||
metricColumn.formatHint && metricColumn.formatHint?.id === 'percent' |
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.
nit:
metricColumn.formatHint && metricColumn.formatHint?.id === 'percent' | |
metricColumn?.formatHint?.id === 'percent' |
x-pack/legacy/plugins/lens/public/xy_visualization/to_expression.ts
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/lens/public/xy_visualization/xy_suggestions.ts
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/lens/public/pie_visualization/visualization.tsx
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
x-pack/legacy/plugins/lens/public/pie_visualization/visualization.tsx
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/lens/public/pie_visualization/visualization.tsx
Outdated
Show resolved
Hide resolved
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.
I left some feedback in private messages about functional behaviour, thanks for creating a todo list!
This comment has been minimized.
This comment has been minimized.
Hey, really nice job!!! Any idea why when doing average it only shows one area and on sum, it shows more sub-areas. does it make sense or is it a bug? The suggestions with the pie chart work well. the pie suggestions seem to be instead of table suggestions. There is still more place in the suggestion to include the table. Any chance you can add the table as well? |
@AlonaNadler If there's data missing, it's probably because it has 0s: because they have 0 area, they are hidden. Table suggestions were removed in #64740, and it doesn't make sense to bring them back in this PR. |
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.
Did some scans and played with the three different chart types. Pretty slick.
One small thing to follow up with, but should go in for 7.8, is to update the "Label position" options for Treemaps. As "Inside or outside" and "Inside only" don't change anything and will be confusing/seem buggy to users.
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
* [Lens] Add pie and treemap visualizations * Fix types * Update to new platform * Support 2-layer treemap and legends, dark mode * Significant restructuring of code * Upgrade to latest charts library * Commit yarn.lock * chore: update elastic-charts * fix types after merge master * Add settings panel and merge visualizations * Fix tests * build: upgrade @elastic/charts to 19.0.0 * refactor: onBrushEnd breaking changes * fix: missing onBrushEnd argument changes * More updates * Fix XY rendering issue when all dates are empty * Fix bugs and tests * Use shared services location * Fix bug in XY chart * fix: update ech to 19.1.1 * fix: lens onBrushEnd breaking changes * Change how pie/treemap settings work * [Design] Fix up settings panel * [Design] Update partition chart config styles * fix eslint * Fix legend issues in pie and XY, add some tests * update to 19.1.2 * Fix text color for treemap * Fix chart switch bug * Fix suggestions Co-authored-by: Marta Bondyra <[email protected]> Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Marco Vettorello <[email protected]> Co-authored-by: cchaos <[email protected]>
* [Lens] Add pie and treemap visualizations * Fix types * Update to new platform * Support 2-layer treemap and legends, dark mode * Significant restructuring of code * Upgrade to latest charts library * Commit yarn.lock * chore: update elastic-charts * fix types after merge master * Add settings panel and merge visualizations * Fix tests * build: upgrade @elastic/charts to 19.0.0 * refactor: onBrushEnd breaking changes * fix: missing onBrushEnd argument changes * More updates * Fix XY rendering issue when all dates are empty * Fix bugs and tests * Use shared services location * Fix bug in XY chart * fix: update ech to 19.1.1 * fix: lens onBrushEnd breaking changes * Change how pie/treemap settings work * [Design] Fix up settings panel * [Design] Update partition chart config styles * fix eslint * Fix legend issues in pie and XY, add some tests * update to 19.1.2 * Fix text color for treemap * Fix chart switch bug * Fix suggestions Co-authored-by: Marta Bondyra <[email protected]> Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Marco Vettorello <[email protected]> Co-authored-by: cchaos <[email protected]> Co-authored-by: Marta Bondyra <[email protected]> Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Marco Vettorello <[email protected]> Co-authored-by: cchaos <[email protected]>
Screenshots for reference:
Chart switcher prevents you from switching to Treemap if there are too many layers:
Closes #38837
Checklist