-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Lens] Chart switch redesign #187475
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] Chart switch redesign #187475
Changes from 16 commits
1d6907f
c51b103
6f5b7f6
06c32e6
c7994ed
ee5220a
97fc4bd
8c0b8b3
54ec813
73c6a30
60c884a
311947f
2ff6955
a384e8d
5d0bffb
063cb59
4c01997
f8a4687
c427714
3d2b1ae
1d703c4
9681afa
f379275
fcde6fd
fc8c741
80fc5ac
aa6dfed
adab691
b088966
87e1adb
8cb1347
92eae1f
a863fb5
88740a1
b4d7f0f
903a711
af42238
2ad0c43
a2b187c
d8fed3e
e58c5c3
14e0c1f
5435f50
b89d264
ff8642f
2b8f60d
14b1f7a
529b174
7b2a121
725e266
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
mbondyra marked this conversation as resolved.
Show resolved
Hide resolved
mbondyra marked this conversation as resolved.
Show resolved
Hide resolved
Contributor
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. I have a couple of questions, in particular related to the new "stacking" behaviour cc @teresaalvarezsoler @MichaelMarcialis :
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. @dej611 good points
This is a very good point and definitely a reason to always show the stacking options.
I agree with the issues for this. We may even hit some backward compatibility issues.
I also had similar concerns when I was testing it. @MichaelMarcialis IMO these are strong reasons to always show the stacking options when there is a bar or area chart regardless of whether there is a breakdown dimension. I fully agree with Marco the gains of showing options when they are most relevant to keep the UI cleaner doesn't compensate the lost of functionality for the edge cases mentioned above and the discoverability issues. Any reasons why we shouldn't do it?
Contributor
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. @teresaalvarezsoler: This is a pretty dense topic, so I'd be happy to jump on a Zoom if ya'll want to discuss in person. In short, I was attempting to accommodate for all possible cases in my designs, including the possibility that users might desire to create a visualization comprised two layers where both layers have stacked breakdowns but the layers themselves are not stacked. In order to do that, we would need to distinguish between layer-level breakdown stacking and visualization-level layer stacking (thus the layer and toolbar controls). If ya'll are comfortable with not accommodating for such edge cases, then I think I'd be OK with what @dej611 is proposing for the sake of further simplification. Thoughts?
MichaelMarcialis marked this conversation as resolved.
Show resolved
Hide resolved
mbondyra marked this conversation as resolved.
Show resolved
Hide resolved
mbondyra marked this conversation as resolved.
Show resolved
Hide resolved
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License | ||
| * 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
| * in compliance with, at your election, the Elastic License 2.0 or the Server | ||
| * Side Public License, v 1. | ||
| */ | ||
|
|
||
| import React from 'react'; | ||
| import type { EuiIconProps } from '@elastic/eui'; | ||
| import { colors } from './common_styles'; | ||
|
|
||
| export const IconChartGauge = ({ title, titleId, ...props }: Omit<EuiIconProps, 'type'>) => { | ||
| return ( | ||
| <svg | ||
| width="30" | ||
| height="22" | ||
| viewBox="0 0 30 22" | ||
| fill="none" | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| aria-labelledby={titleId} | ||
| {...props} | ||
| > | ||
| {title ? <title id={titleId}>{title}</title> : null} | ||
| <path | ||
| className={colors.subdued} | ||
| d="M1 13a1 1 0 00-1 1v2a1 1 0 102 0v-1h5v1a1 1 0 102 0v-1h5v1a1 1 0 102 0v-1h5v1a1 1 0 102 0v-1h5v1a1 1 0 102 0v-2a1 1 0 00-1-1H1z" | ||
| /> | ||
| <path | ||
| className={colors.accent} | ||
| d="M0 6a1 1 0 011-1h24a1 1 0 011 1v4a1 1 0 01-1 1H1a1 1 0 01-1-1V6z" | ||
| /> | ||
| </svg> | ||
| ); | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License | ||
| * 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
| * in compliance with, at your election, the Elastic License 2.0 or the Server | ||
| * Side Public License, v 1. | ||
| */ | ||
|
|
||
| import React from 'react'; | ||
| import type { EuiIconProps } from '@elastic/eui'; | ||
|
|
||
| export const IconChartGaugeArcSimple = ({ | ||
| title, | ||
| titleId, | ||
| ...props | ||
| }: Omit<EuiIconProps, 'type'>) => { | ||
| return ( | ||
| <svg | ||
| width="16" | ||
| height="16" | ||
| viewBox="0 0 16 16" | ||
| fill="none" | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| aria-labelledby={titleId} | ||
| {...props} | ||
| > | ||
| {title ? <title id={titleId}>{title}</title> : null} | ||
| <path | ||
| fillRule="evenodd" | ||
| clipRule="evenodd" | ||
| d="M12.0962 3.90381C9.55779 1.3654 5.44221 1.3654 2.90381 3.90381C0.484359 6.32325 0.370973 10.1755 2.56365 12.7292L3.61091 11.682C3.80617 11.4867 4.12276 11.4867 4.31802 11.682C4.51328 11.8772 4.51328 12.1938 4.31802 12.3891L2.90381 13.8033C2.70854 13.9986 2.39196 13.9986 2.1967 13.8033C-0.732233 10.8744 -0.732233 6.12563 2.1967 3.1967C5.12563 0.267767 9.87437 0.267767 12.8033 3.1967C15.7322 6.12563 15.7322 10.8744 12.8033 13.8033C12.608 13.9986 12.2915 13.9986 12.0962 13.8033L10.682 12.3891C10.4867 12.1938 10.4867 11.8772 10.682 11.682C10.8772 11.4867 11.1938 11.4867 11.3891 11.682L12.4364 12.7292C14.629 10.1755 14.5156 6.32325 12.0962 3.90381Z" | ||
| /> | ||
| </svg> | ||
| ); | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License | ||
| * 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
| * in compliance with, at your election, the Elastic License 2.0 or the Server | ||
| * Side Public License, v 1. | ||
| */ | ||
|
|
||
| import React from 'react'; | ||
| import type { EuiIconProps } from '@elastic/eui'; | ||
|
|
||
| export const IconChartGaugeCircleSimple = ({ | ||
| title, | ||
| titleId, | ||
| ...props | ||
| }: Omit<EuiIconProps, 'type'>) => { | ||
| return ( | ||
| <svg | ||
| width="16" | ||
| height="16" | ||
| viewBox="0 0 16 16" | ||
| fill="none" | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| aria-labelledby={titleId} | ||
| {...props} | ||
| > | ||
| {title ? <title id={titleId}>{title}</title> : null} | ||
| <path | ||
| fillRule="evenodd" | ||
| clipRule="evenodd" | ||
| d="M7.5 1C3.91015 1 1 3.91015 1 7.5C1 11.0899 3.91015 14 7.5 14C11.0899 14 14 11.0899 14 7.5C14 3.91015 11.0899 1 7.5 1ZM0 7.5C0 3.35786 3.35786 0 7.5 0C11.6421 0 15 3.35786 15 7.5C15 11.6421 11.6421 15 7.5 15C3.35786 15 0 11.6421 0 7.5Z" | ||
| /> | ||
| </svg> | ||
| ); | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License | ||
| * 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
| * in compliance with, at your election, the Elastic License 2.0 or the Server | ||
| * Side Public License, v 1. | ||
| */ | ||
|
|
||
| import React from 'react'; | ||
| import type { EuiIconProps } from '@elastic/eui'; | ||
|
|
||
| export const IconChartGaugeSemiCircleSimple = ({ | ||
| title, | ||
| titleId, | ||
| ...props | ||
| }: Omit<EuiIconProps, 'type'>) => { | ||
| return ( | ||
| <svg | ||
| width="16" | ||
| height="16" | ||
| viewBox="0 0 16 16" | ||
| fill="none" | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| aria-labelledby={titleId} | ||
| {...props} | ||
| > | ||
| {title ? <title id={titleId}>{title}</title> : null} | ||
| <path | ||
| fillRule="evenodd" | ||
| clipRule="evenodd" | ||
| d="M1.01894 11H2.5C2.77614 11 3 11.2239 3 11.5C3 11.7761 2.77614 12 2.5 12H0.5C0.223858 12 0 11.7761 0 11.5C0 7.35786 3.35786 4 7.5 4C11.6421 4 15 7.35786 15 11.5C15 11.7761 14.7761 12 14.5 12H12.5C12.2239 12 12 11.7761 12 11.5C12 11.2239 12.2239 11 12.5 11H13.9811C13.7257 7.64378 10.9216 5 7.5 5C4.07839 5 1.27426 7.64378 1.01894 11Z" | ||
| /> | ||
| </svg> | ||
| ); | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License | ||
| * 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
| * in compliance with, at your election, the Elastic License 2.0 or the Server | ||
| * Side Public License, v 1. | ||
| */ | ||
|
|
||
| import React from 'react'; | ||
| import type { EuiIconProps } from '@elastic/eui'; | ||
|
|
||
| export const IconChartHorizontalBulletSimple = ({ | ||
| title, | ||
| titleId, | ||
| ...props | ||
| }: Omit<EuiIconProps, 'type'>) => { | ||
| return ( | ||
| <svg | ||
| width="16" | ||
| height="16" | ||
| viewBox="0 0 16 16" | ||
| fill="none" | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| aria-labelledby={titleId} | ||
| {...props} | ||
| > | ||
| {title ? <title id={titleId}>{title}</title> : null} | ||
| <path | ||
| fillRule="evenodd" | ||
| clipRule="evenodd" | ||
| d="M0 7.5C0 7.22386 0.223858 7 0.5 7H15.5C15.7761 7 16 7.22386 16 7.5V9.5C16 9.77614 15.7761 10 15.5 10C15.2239 10 15 9.77614 15 9.5V8H1V9.5C1 9.77614 0.776142 10 0.5 10C0.223858 10 0 9.77614 0 9.5V7.5Z" | ||
| /> | ||
| </svg> | ||
| ); | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License | ||
| * 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
| * in compliance with, at your election, the Elastic License 2.0 or the Server | ||
| * Side Public License, v 1. | ||
| */ | ||
|
|
||
| import React from 'react'; | ||
| import type { EuiIconProps } from '@elastic/eui'; | ||
|
|
||
| export const IconChartVerticalBulletSimple = ({ | ||
| title, | ||
| titleId, | ||
| ...props | ||
| }: Omit<EuiIconProps, 'type'>) => { | ||
| return ( | ||
| <svg | ||
| width="16" | ||
| height="16" | ||
| viewBox="0 0 16 16" | ||
| fill="none" | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| aria-labelledby={titleId} | ||
| {...props} | ||
| > | ||
| {title ? <title id={titleId}>{title}</title> : null} | ||
| <path | ||
| fillRule="evenodd" | ||
| clipRule="evenodd" | ||
| d="M0 7.5C0 7.22386 0.223858 7 0.5 7H15.5C15.7761 7 16 7.22386 16 7.5V9.5C16 9.77614 15.7761 10 15.5 10C15.2239 10 15 9.77614 15 9.5V8H1V9.5C1 9.77614 0.776142 10 0.5 10C0.223858 10 0 9.77614 0 9.5V7.5Z" | ||
| /> | ||
| </svg> | ||
| ); | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License | ||
| * 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
| * in compliance with, at your election, the Elastic License 2.0 or the Server | ||
| * Side Public License, v 1. | ||
| */ | ||
|
|
||
| import React from 'react'; | ||
| import type { EuiIconProps } from '@elastic/eui'; | ||
|
|
||
| export const IconDonutHoleLarge = ({ title, titleId, ...props }: Omit<EuiIconProps, 'type'>) => { | ||
| return ( | ||
| <svg | ||
| width="16" | ||
| height="16" | ||
| viewBox="0 0 16 16" | ||
| fill="none" | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| aria-labelledby={titleId} | ||
| {...props} | ||
| > | ||
| {title ? <title id={titleId}>{title}</title> : null} | ||
|
|
||
| <path | ||
| fillRule="evenodd" | ||
| clipRule="evenodd" | ||
| d="M7.5 3C5.01472 3 3 5.01472 3 7.5C3 9.98528 5.01472 12 7.5 12C9.98528 12 12 9.98528 12 7.5C12 5.01472 9.98528 3 7.5 3ZM4 7.5C4 5.567 5.567 4 7.5 4C9.433 4 11 5.567 11 7.5C11 9.433 9.433 11 7.5 11C5.567 11 4 9.433 4 7.5Z" | ||
| fill="#343741" | ||
| /> | ||
| <path | ||
| fillRule="evenodd" | ||
| clipRule="evenodd" | ||
| d="M7.5 0C3.35786 0 0 3.35786 0 7.5C0 11.6421 3.35786 15 7.5 15C11.6421 15 15 11.6421 15 7.5C15 3.35786 11.6421 0 7.5 0ZM1 7.5C1 3.91015 3.91015 1 7.5 1C11.0899 1 14 3.91015 14 7.5C14 11.0899 11.0899 14 7.5 14C3.91015 14 1 11.0899 1 7.5Z" | ||
| fill="#343741" | ||
| /> | ||
| </svg> | ||
| ); | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License | ||
| * 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
| * in compliance with, at your election, the Elastic License 2.0 or the Server | ||
| * Side Public License, v 1. | ||
| */ | ||
|
|
||
| import React from 'react'; | ||
| import type { EuiIconProps } from '@elastic/eui'; | ||
|
|
||
| export const IconDonutHoleMedium = ({ title, titleId, ...props }: Omit<EuiIconProps, 'type'>) => { | ||
| return ( | ||
| <svg | ||
| width="16" | ||
| height="16" | ||
| viewBox="0 0 16 16" | ||
| fill="none" | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| aria-labelledby={titleId} | ||
| {...props} | ||
| > | ||
| {title ? <title id={titleId}>{title}</title> : null} | ||
|
|
||
| <path | ||
| fillRule="evenodd" | ||
| clipRule="evenodd" | ||
| d="M7.5 4C5.567 4 4 5.567 4 7.5C4 9.433 5.567 11 7.5 11C9.433 11 11 9.433 11 7.5C11 5.567 9.433 4 7.5 4ZM5 7.5C5 6.11929 6.11929 5 7.5 5C8.88071 5 10 6.11929 10 7.5C10 8.88071 8.88071 10 7.5 10C6.11929 10 5 8.88071 5 7.5Z" | ||
| fill="#343741" | ||
| /> | ||
| <path | ||
| fillRule="evenodd" | ||
| clipRule="evenodd" | ||
| d="M7.5 0C3.35786 0 0 3.35786 0 7.5C0 11.6421 3.35786 15 7.5 15C11.6421 15 15 11.6421 15 7.5C15 3.35786 11.6421 0 7.5 0ZM1 7.5C1 3.91015 3.91015 1 7.5 1C11.0899 1 14 3.91015 14 7.5C14 11.0899 11.0899 14 7.5 14C3.91015 14 1 11.0899 1 7.5Z" | ||
| fill="#343741" | ||
| /> | ||
| </svg> | ||
| ); | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License | ||
| * 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
| * in compliance with, at your election, the Elastic License 2.0 or the Server | ||
| * Side Public License, v 1. | ||
| */ | ||
|
|
||
| import React from 'react'; | ||
| import type { EuiIconProps } from '@elastic/eui'; | ||
|
|
||
| export const IconDonutHoleSmall = ({ title, titleId, ...props }: Omit<EuiIconProps, 'type'>) => { | ||
| return ( | ||
| <svg | ||
| width="16" | ||
| height="16" | ||
| viewBox="0 0 16 16" | ||
| fill="none" | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| aria-labelledby={titleId} | ||
| {...props} | ||
| > | ||
| {title ? <title id={titleId}>{title}</title> : null} | ||
|
|
||
| <path | ||
| fillRule="evenodd" | ||
| clipRule="evenodd" | ||
| d="M7.5 5C6.11929 5 5 6.11929 5 7.5C5 8.88071 6.11929 10 7.5 10C8.88071 10 10 8.88071 10 7.5C10 6.11929 8.88071 5 7.5 5ZM6 7.5C6 6.67157 6.67157 6 7.5 6C8.32843 6 9 6.67157 9 7.5C9 8.32843 8.32843 9 7.5 9C6.67157 9 6 8.32843 6 7.5Z" | ||
| fill="#343741" | ||
| /> | ||
| <path | ||
| fillRule="evenodd" | ||
| clipRule="evenodd" | ||
| d="M7.5 0C3.35786 0 0 3.35786 0 7.5C0 11.6421 3.35786 15 7.5 15C11.6421 15 15 11.6421 15 7.5C15 3.35786 11.6421 0 7.5 0ZM1 7.5C1 3.91015 3.91015 1 7.5 1C11.0899 1 14 3.91015 14 7.5C14 11.0899 11.0899 14 7.5 14C3.91015 14 1 11.0899 1 7.5Z" | ||
| fill="#343741" | ||
| /> | ||
| </svg> | ||
| ); | ||
| }; |
Uh oh!
There was an error while loading. Please reload this page.