-
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] Fitting functions #69820
[Lens] Fitting functions #69820
Conversation
…workspace_panel_wrapper.scss Co-authored-by: Caroline Horn <[email protected]>
Jenkins, test this. |
@elasticmachine merge upstream |
@wylieconlon @mbondyra This PR depends on #69263 which isn't merged yet, but besides that it's ready to review. |
Thanks for the second review round.
To me it seems like there is enough uncertainty about wording to kindly ask @gchaps to weigh in. This PR adds the ability to configure how missing values in the chart are treated. Each option has a name and a description: This is what the user sees on an unconfigured chart: This is how it looks like when the user can't configure this at the moment: Open questions:
|
I think as Wylie stated above, the actual labels should be camelcased. We usually never lowercase values in a select like that.
I would have a slight tendency to put a verb in front of it, as Wylie suggested, like "Fit missing values" (or potentially "fit" is maybe a bit too "technical"): "Fill missing values" |
I agree that the text needs a verb in front of it. @timroes' suggestion for "Fill missing values" is good. My vote is for init caps. That would also be consistent with how it's done in other apps. "Carry", "Look ahead" (should be two words if you use it), and "Interpolate linearly" don't feel obvious to me. For the last, I'm wondering if we can come up with an easier explanation--and also make it consistent with the other descriptions. Here is my suggestion.
|
I was a bit confused about the difference between "Average" and "Linear", so I looked at the storybook example for this. This is what the "Average" option looks like: This behavior is actually somewhat similar to what "Nearest" does: Given these examples, it's my preference to actually remove both of these options from the menu. I think most users will be better served by "Linear". |
Thanks for your input @gchaps ! I applied your suggestions, this is how it looks now (ignore the weird colors): @wylieconlon I think it's a good idea to start with just |
@cchaos I think this is close enough for you to jump in with button styling if you want to (we can also do it on a separate PR - in that case could you check again and approve?) |
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 can do a follow-up PR, but had a couple quick suggestions to get it a bit better in this PR.
setOpen(!open); | ||
}} | ||
> | ||
<EuiIcon type="gear" /> |
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.
Let's just be explicit here. Also can you make the button similar to how you did the chart select?
<EuiIcon type="gear" /> | |
Settings |
💚 Build SucceededBuild metrics@kbn/optimizer bundle module count
History
To update your PR or re-run it, just comment with: |
As other work depends on this, I'm going to merge the PR with the two existing approvals. If someone has concerns feel free to raise them here and I will set up a follow up PR. |
* master: [Lens] Fitting functions (elastic#69820) [Telemetry] Add documentation about Application Usage (elastic#70624) [Ingest Manager] Improve agent unenrollment with unenroll action (elastic#70031) Handle timeouts on creating templates (elastic#70635) [Lens] Add ability to set colors for y-axis series (elastic#70311) [Uptime] Use elastic charts donut (elastic#70364) [Ingest Manager] Update registry URL to point to snapshot registry (elastic#70687) [Composable template] Create / Edit wizard (elastic#70220) [APM] Optimize services overview (elastic#69648)
* master: [APM-UI] e2e speed up build (elastic#70704) skip flaky suite (elastic#70764) skip flaky suite (elastic#70762) [Security Solution][Endpoint] Update to new manifest format (without compression) (elastic#70752) [functional tests] test url field formatter on dashboard and discover (elastic#70736) logout from transform_poweruser user in after method of transform tests (elastic#70644) [SECURITY] Bug fix for topN on draggables (elastic#70450) [Logs UI] Reorganise log rate anomaly table (elastic#69516) Update dependency @elastic/charts to v19.7.0 (elastic#69791) Add googlecloud metricbeat module to Kibana Home (elastic#70652) [Logs UI] Logs overview queries for the observability dashboard (elastic#70413) [Lens] Fitting functions (elastic#69820)
Fixes #68403
This PR exposes the
elastic-charts
fitting functions (except for "Explicit") as a chart-level setting of the xy-chart.The popover for now only contains a select for the fitting function, other options like color palette will be part of the same popover in a later iteration
If there is no line or area series, the select will be disabled (state will still be carried along)
For Pie charts there is no popover menu in the toolbar (if it gets added later because of other features, it won't contain the select at all)
Architecture
On an expression level, there is a new optional string argument
fittingFunction
on thelens_xy_chart
, taking all available options. If no value is provided, it defaults toNone
, maintaining the old behavior - this means no migration is necessary, saved Lens visualizations will simply run an expression without afittingFunction
argument.