Skip to content

[XY] Defaults the point size to 1 and corrects the vislib migrations#118994

Merged
stratoula merged 12 commits intoelastic:mainfrom
stratoula:migrate-circle-radius
Dec 8, 2021
Merged

[XY] Defaults the point size to 1 and corrects the vislib migrations#118994
stratoula merged 12 commits intoelastic:mainfrom
stratoula:migrate-circle-radius

Conversation

@stratoula
Copy link
Contributor

@stratoula stratoula commented Nov 18, 2021

Summary

This PR introduces the following changes:

  • Changes the default point size to be 1 instead of 3. This means that all the new visualizations will default to a smaller point size

Before
image

Now
image

  • Updates the xy migration script in order to add ciclesRadius attribute to 1 for all these visualizations that don't have the attribute (these will be visualizations made by vislib). All the visualizations that have been created with the new implementation have already this attribute and we don't change them.
  • Updates the migration script to add as a fitting function the linear for all these visualizations that haven't this attribute.

How to test

  1. Create a new area/line visualization and check that the point size is 1
  2. Create a visualization with vislib (for example from 7.11) and import it. The point size should be 1
  3. Create a visualization with EC (for example from 7.15) and import it. The point size should be 3.

Here is a screenshot with a 7.11 area imported to this branch. The point size is set to 1
image

Checklist

@stratoula stratoula changed the title [XY] Changes the default point size to 1 and corrects the vislib migr… [XY] Defaults the point size to 1 and corrects the vislib migrations Nov 18, 2021
@stratoula stratoula added the Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// label Nov 18, 2021
@stratoula stratoula marked this pull request as ready for review November 18, 2021 12:16
@stratoula stratoula requested a review from a team as a code owner November 18, 2021 12:16
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors)

@stratoula
Copy link
Contributor Author

@markov00 how do you feel about this change?
To wrap up

  • I am changing the default dot size from 3 to 1 to be in sync with lens (for the new visualizations)
  • I am migrating all the vislib old visualizations to size 1 (unless the users have specifically set this setting)
  • I am migrating all the vislib old visualizations to the linear fitting function (unless it already exists in the SO)

@flash1293
Copy link
Contributor

@elasticmachine merge upstream

@markov00
Copy link
Contributor

@markov00 how do you feel about this change? To wrap up

  • I am changing the default dot size from 3 to 1 to be in sync with lens (for the new visualizations)
  • I am migrating all the vislib old visualizations to size 1 (unless the users have specifically set this setting)
  • I am migrating all the vislib old visualizations to the linear fitting function (unless it already exists in the SO)

@stratoula @flash1293 Lens seems to hide the dots if I'm not wrong, or it was like that until 7.16.0. Was that changed in 8.0?

Why we are adding the linear fitting function? was that the default behaviour pre-elastic-charts?

@stratoula
Copy link
Contributor Author

@elasticmachine merge upstream

@stratoula
Copy link
Contributor Author

@markov00 about the linear. We did this change due to this sdh https://github.com/elastic/sdh-kibana/issues/2284. There is no fitting function that does exactly what vislib did. Until now, we were migrating them to the zero but this is not the best option for the customers. We thought that maybe the linear is the best approach here. I don't have a strong opinion tbh. If we could have the same behavior as the vislib, this would be the best.

About the dots. This is true, Lens doesn't have any dots. I just decided to display the dots but with size 1 because it is closer to Lens and because so far we were displaying the dots with size 3 so maybe if we hide them, it will be a bigger change for the users. Again, I don't have a strong opinion. I could also hide them.

What do you think is the best approach for these two issues?

@stratoula
Copy link
Contributor Author

@elasticmachine merge upstream

@stratoula
Copy link
Contributor Author

@elasticmachine merge upstream

@stratoula
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@dej611 dej611 left a comment

Choose a reason for hiding this comment

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

Code review only 👍

@markov00
Copy link
Contributor

markov00 commented Dec 3, 2021

@markov00 about the linear. We did this change due to this sdh elastic/sdh-kibana#2284. There is no fitting function that does exactly what vislib did. Until now, we were migrating them to the zero but this is not the best option for the customers. We thought that maybe the linear is the best approach here. I don't have a strong opinion tbh. If we could have the same behavior as the vislib, this would be the best.

Linear is fine, we merged this few days ago elastic/elastic-charts#1505 to allow styling linear interpolation as it was a the original line

About the dots. This is true, Lens doesn't have any dots. I just decided to display the dots but with size 1 because it is closer to Lens and because so far we were displaying the dots with size 3 so maybe if we hide them, it will be a bigger change for the users. Again, I don't have a strong opinion. I could also hide them.

Ok, if we just migrate old vislib saved viz to new ech version with dotsize of 1 I'm fine.

@stratoula
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@markov00 markov00 left a comment

Choose a reason for hiding this comment

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

Code review only: looks good to me, probably you need to fix one the condition I've commented on.

stratoula and others added 3 commits December 6, 2021 15:22
…ed_object_migrations.test.ts

Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>
…ed_object_migrations.ts

Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>
@kibana-ci
Copy link

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

@stratoula stratoula added the auto-backport Deprecated - use backport:version if exact versions are needed label Dec 6, 2021
@stratoula stratoula merged commit 82979a3 into elastic:main Dec 8, 2021
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Dec 8, 2021
…lastic#118994)

* [XY] Changes the default point size to 1 and corrects the vislib migrations

* Fixes the unit test

* Change the migration function to default te fitting function to linear

* Update src/plugins/visualizations/server/migrations/visualization_saved_object_migrations.test.ts

Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>

* Update src/plugins/visualizations/server/migrations/visualization_saved_object_migrations.ts

Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>

* Fixes on PR review

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Dec 8, 2021
…lastic#118994)

* [XY] Changes the default point size to 1 and corrects the vislib migrations

* Fixes the unit test

* Change the migration function to default te fitting function to linear

* Update src/plugins/visualizations/server/migrations/visualization_saved_object_migrations.test.ts

Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>

* Update src/plugins/visualizations/server/migrations/visualization_saved_object_migrations.ts

Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>

* Fixes on PR review

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
8.0
7.16

The backport PRs will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Dec 8, 2021
…118994) (#120717)

* [XY] Changes the default point size to 1 and corrects the vislib migrations

* Fixes the unit test

* Change the migration function to default te fitting function to linear

* Update src/plugins/visualizations/server/migrations/visualization_saved_object_migrations.test.ts

Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>

* Update src/plugins/visualizations/server/migrations/visualization_saved_object_migrations.ts

Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>

* Fixes on PR review

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>
kibanamachine added a commit that referenced this pull request Dec 8, 2021
…118994) (#120718)

* [XY] Changes the default point size to 1 and corrects the vislib migrations

* Fixes the unit test

* Change the migration function to default te fitting function to linear

* Update src/plugins/visualizations/server/migrations/visualization_saved_object_migrations.test.ts

Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>

* Update src/plugins/visualizations/server/migrations/visualization_saved_object_migrations.ts

Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>

* Fixes on PR review

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>
TinLe pushed a commit to TinLe/kibana that referenced this pull request Dec 22, 2021
…lastic#118994)

* [XY] Changes the default point size to 1 and corrects the vislib migrations

* Fixes the unit test

* Change the migration function to default te fitting function to linear

* Update src/plugins/visualizations/server/migrations/visualization_saved_object_migrations.test.ts

Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>

* Update src/plugins/visualizations/server/migrations/visualization_saved_object_migrations.ts

Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>

* Fixes on PR review

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Deprecated - use backport:version if exact versions are needed Feature:XYAxis XY-Axis charts (bar, area, line) release_note:fix Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v7.16.1 v8.0.0 v8.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants