Skip to content
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

Convert Aggs-based Goal chart to Lens Gauge #179489

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

nickofthyme
Copy link
Contributor

Summary

Changes the Convert to Lens functionality for Aggs-Based Goal charts that are not bucketed and have a single metric to the Lens Gauge chart.

The single metric bucketed Goal still converts to the faceted Metric in Lens until we add support for small multiples in Lens.

Zight Recording 2024-03-26 at 02 09 44 PM

Checklist

@nickofthyme nickofthyme added Feature:Gauge Vis Gauge and goal visualization Feature:Lens labels Mar 26, 2024
@nickofthyme nickofthyme requested a review from a team as a code owner March 26, 2024 21:16
@nickofthyme nickofthyme added the release_note:skip Skip the PR/issue when compiling release notes label Mar 26, 2024
@@ -14,15 +14,14 @@ import {
} from '@kbn/visualizations-plugin/common';
import { GaugeVisParams } from '../../types';

export const getConfiguration = (
export const getMetricConfiguration = (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think is better to have tick not linked with the bands, feels more natural and clean.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @markov00, just circling back to this PR.

Can you elaborate what you mean here? This code line does not relate to your comment, are you speaking generally?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't remember exactly but I think I was speaking about the migration from a agg base gauge to a lens gauge (not the one to a metric that looks like in this file).
In that case, I believe we should configure the automatic tick alignment by default and not a tick aligned with the bands.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that Ticks on bands is on by default only when you initially switch on the Band colors switch. but the conversion doesn't seems to enable that switch for the Agg-based Gauge, but it enables it to the agg-based Goal chart.

@kibana-ci
Copy link
Collaborator

kibana-ci commented May 15, 2024

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #11 / convertToLens should return correct state for valid vis
  • [job] [logs] Jest Tests #11 / convertToLens should return correct state for valid vis
  • [job] [logs] Jest Tests #11 / convertToLens should return null if buckets count is more than 1
  • [job] [logs] Jest Tests #11 / convertToLens should return null if buckets count is more than 1
  • [job] [logs] Jest Tests #11 / convertToLens should return null if getColumnsFromVis returns null
  • [job] [logs] Jest Tests #11 / convertToLens should return null if getColumnsFromVis returns null
  • [job] [logs] Jest Tests #11 / convertToLens should return null if metric column data type is different from number
  • [job] [logs] Jest Tests #11 / convertToLens should return null if metric column data type is different from number
  • [job] [logs] Jest Tests #11 / convertToLens should return null if metrics count is more than 1
  • [job] [logs] Jest Tests #11 / convertToLens should return null if metrics count is more than 1
  • [job] [logs] Jest Tests #11 / convertToLens to Gauge should return gauge for single metric non-bucketed
  • [job] [logs] Jest Tests #11 / convertToLens to Gauge should return gauge for single metric non-bucketed
  • [job] [logs] Jest Tests #11 / convertToLens to Metric should return metric for single metric bucketed
  • [job] [logs] Jest Tests #11 / convertToLens to Metric should return metric for single metric bucketed
  • [job] [logs] FTR Configs #24 / lens app - Agg based Vis Open in Lens Goal should convert to Lens
  • [job] [logs] FTR Configs #24 / lens app - Agg based Vis Open in Lens Goal should convert to Lens
  • [job] [logs] FTR Configs #29 / Visualizations - Group 2 lens app - Agg based Vis Open in Lens Gauge should convert color ranges
  • [job] [logs] FTR Configs #81 / Visualizations - Group 2 lens app - Agg based Vis Open in Lens Gauge should convert color ranges
  • [job] [logs] FTR Configs #86 / Visualizations - Group 2 lens app - Agg based Vis Open in Lens Gauge should convert color ranges
  • [job] [logs] FTR Configs #29 / Visualizations - Group 2 lens app - Agg based Vis Open in Lens Gauge should convert color ranges
  • [job] [logs] FTR Configs #86 / Visualizations - Group 2 lens app - Agg based Vis Open in Lens Gauge should convert color ranges
  • [job] [logs] FTR Configs #81 / Visualizations - Group 2 lens app - Agg based Vis Open in Lens Gauge should convert color ranges

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
charts 253 250 -3

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
lens 1.5MB 1.5MB +24.0B
visTypeGauge 8.8KB 9.2KB +351.0B
visualizations 285.6KB 286.2KB +593.0B
total +968.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
charts 44.9KB 45.2KB +237.0B
visTypeGauge 11.2KB 11.4KB +154.0B
total +391.0B
Unknown metric groups

API count

id before after diff
charts 268 269 +1

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Gauge Vis Gauge and goal visualization Feature:Lens release_note:skip Skip the PR/issue when compiling release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Visualize-Lens] Provide migration for Visualize Goal to Lens Gauge
3 participants