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

Fixes problem with one chart plotted for multiple y axis when migrating from an old SO #112972

Merged
merged 10 commits into from
Oct 6, 2021

Conversation

stratoula
Copy link
Contributor

@stratoula stratoula commented Sep 23, 2021

Summary

Fixes #112345.

Which is the problem

The problem is that there are some very old SOs that don't have the following params properties:

  • seriesParams
  • valueAxes
  • categoryAxes

An example is:
image

Here is a ndjson for testing:
testing.ndjson.zip

Solution

The reason that the charts are not rendered (only one is rendered) is because we don't have the seriesParams array in our params. For this reason, the default is applied and only the first chart is rendered. I fixed that by extracting the seriesParams by the aggs property.

But this doesn't solve all the problems. For example if the user has defined different yaxis which means multiple valueAxes, when upgrade, they will render in one axis (the left one). The reason that I can't fix it is that I don't know how the configuration was back then.

Vislib

The vislib implementation plots all charts but still doesn't solve the problem with the multiple y-axis.

Checklist

@stratoula stratoula changed the title Fixes problem with one chart plotted for multiple y axis when migrati… Fixes problem with one chart plotted for multiple y axis when migrating from an old SO Sep 23, 2021
@stratoula
Copy link
Contributor Author

@elasticmachine merge upstream

@stratoula stratoula added Feature:XYAxis XY-Axis charts (bar, area, line) release_note:fix Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.16.0 v8.0.0 labels Sep 27, 2021
@stratoula stratoula marked this pull request as ready for review September 27, 2021 09:31
@stratoula stratoula requested a review from a team as a code owner September 27, 2021 09:31
@elasticmachine
Copy link
Contributor

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

@stratoula
Copy link
Contributor Author

@elasticmachine merge upstream

@stratoula
Copy link
Contributor Author

@elasticmachine merge upstream

@stratoula
Copy link
Contributor Author

@elasticmachine merge upstream

@stratoula
Copy link
Contributor Author

@elasticmachine merge upstream

@elastic elastic deleted a comment from kibanamachine Oct 4, 2021
@stratoula
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
visTypeXy 100 101 +1

Async chunks

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

id before after diff
visTypeXy 62.2KB 61.8KB -404.0B

Page load bundle

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

id before after diff
visTypeXy 39.5KB 40.1KB +622.0B

History

To update your PR or re-run it, just comment with:
@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.

Tested in Chrome and Safari 👍

@stratoula stratoula added the auto-backport Deprecated - use backport:version if exact versions are needed label Oct 6, 2021
@stratoula stratoula merged commit fa59b52 into elastic:master Oct 6, 2021
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Oct 6, 2021
…ng from an old SO (elastic#112972)

* Fixes problem with one chart plotted for multiple y axis when migrationg from an old SO

* Add unit tests

* Address PR comments

Co-authored-by: Kibana Machine <[email protected]>
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Oct 6, 2021
…ng from an old SO (#112972) (#114098)

* Fixes problem with one chart plotted for multiple y axis when migrationg from an old SO

* Add unit tests

* Address PR comments

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Stratoula Kalafateli <[email protected]>
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 Visualization editors, elastic-charts and infrastructure v7.16.0 v8.0.0
Projects
None yet
4 participants