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

[Bug] fix TSVB y-axis #2079

Merged

Conversation

AbhishekReddy1127
Copy link
Contributor

@AbhishekReddy1127 AbhishekReddy1127 commented Aug 5, 2022

Signed-off-by: AbhishekReddy1127 nallamsa@amazon.com

Description

Fixed the TSVB y-axis.

Issues Resolved

#1873

Check List

  • New functionality includes testing.
    • All tests pass
      • yarn test:jest
      • yarn test:jest_integration
      • yarn test:ftr
  • New functionality has been documented.
  • Commits are signed per the DCO using --signoff

Signed-off-by: AbhishekReddy1127 <nallamsa@amazon.com>
@codecov-commenter
Copy link

Codecov Report

Merging #2079 (c4076ff) into main (1e34c06) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #2079   +/-   ##
=======================================
  Coverage   67.23%   67.23%           
=======================================
  Files        3100     3100           
  Lines       59564    59564           
  Branches     9062     9062           
=======================================
  Hits        40047    40047           
  Misses      17331    17331           
  Partials     2186     2186           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@AbhishekReddy1127 AbhishekReddy1127 added the bug Something isn't working label Aug 5, 2022
@AbhishekReddy1127 AbhishekReddy1127 marked this pull request as ready for review August 5, 2022 06:17
@AbhishekReddy1127 AbhishekReddy1127 requested a review from a team as a code owner August 5, 2022 06:17
Copy link
Member

@joshuarrrr joshuarrrr left a comment

Choose a reason for hiding this comment

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

@AbhishekReddy1127 Great find!

Usually the hard work in a bug fix like this is the sleuthing that it takes to understand the what caused the buggy behavior (and, in a regression like this, when/what introduced it).

Can you add an explanation of the fix to the issue description (and commit body)? That will help future devs understand why/how this fixed the bug.

In addition, for a UI issue, it's useful to have a screenshot or animation in the description that shows that it fixes the bug. Are there any tests you have found that should be updated to prevent a similar regression in the future?

@kavilla
Copy link
Member

kavilla commented Aug 8, 2022

@AbhishekReddy1127 Great find!

Usually the hard work in a bug fix like this is the sleuthing that it takes to understand the what caused the buggy behavior (and, in a regression like this, when/what introduced it).

Can you add an explanation of the fix to the issue description (and commit body)? That will help future devs understand why/how this fixed the bug.

In addition, for a UI issue, it's useful to have a screenshot or animation in the description that shows that it fixes the bug. Are there any tests you have found that should be updated to prevent a similar regression in the future?

+1, yes thanks @AbhishekReddy1127 for getting this. But will help will why removing this was the bug and also ensuring we don't have any regressions.

@kavilla kavilla linked an issue Aug 8, 2022 that may be closed by this pull request
@ananzh ananzh changed the title BugFix-TSVB-Yaxis [Bug] fix TSVB y-axis Aug 8, 2022
@@ -212,7 +212,6 @@ export class TimeseriesVisualization extends Component {
seriesDataRow.groupId = groupId;
seriesDataRow.yScaleType = yScaleType;
seriesDataRow.hideInLegend = Boolean(seriesGroup.hide_in_legend);
seriesDataRow.useDefaultGroupDomain = !isCustomDomain;
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we post the behavior, for before / after change to ensure we are getting expected behavior ?

Copy link
Contributor Author

@AbhishekReddy1127 AbhishekReddy1127 Aug 9, 2022

Choose a reason for hiding this comment

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

@kavilla @mihirsoni @joshuarrrr @ananzh
This is how the Y-axis was looking due to the bug.
Screen Shot 2022-08-09 at 11 15 22 AM

But in my investigation I came to know that, this was happening because of a prop useDefaultGroupDomain. Actually this prop was introduced into the elastic charts to allow clustering for the multiple series which will share a common Y domain i.e for example the stacked and non- stacked bars will have the same Y common domain/axis. As per the elastic/charts whenever the useDefaultGroupDomain is set to true, it will force to group the series/visualiations groupId's to a default group domain. But, TSVB is not a shared Y domain. So, I felt useDefaultGroupDomain may not be the right prop for TSVB.

Either we can remove the line 215 as I did above or by setting the useDefaultGroupDomain to false is also solving this issue.

After removing the line, the output is looking like:
Screen Shot 2022-08-09 at 11 34 45 AM

or, either setting the useDefaultGroupDomain to false
Screen Shot 2022-08-09 at 11 36 50 AM

As,@joshuarrrr asked about the tests, i could think of like to verify whether the useDefaultGroupDomain is set to false so that TSVB will work as expected.
This is what I have with me until now. Please correct me if i am wrong anywhere.

@AMoo-Miki
Copy link
Collaborator

From what I see in the code:

const groupId = hasSeparateAxis || isStackedWithinSeries ? seriesGroup.id : mainAxisGroupId;

where

const mainAxisGroupId = yAxisIdGenerator('main_group');

... which indicates that the global default groupId is not used by TSVB. Hence, TSVB should have not been using useDefaultGroupDomain ever.

@kavilla kavilla merged commit 55181d4 into opensearch-project:main Aug 9, 2022
opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 9, 2022
Issue:
#1873

This was happening because of a prop useDefaultGroupDomain. This prop was introduced into the elastic charts to allow clustering for the multiple series which will share a common Y domain i.e for example the stacked and non- stacked bars will have the same Y common domain/axis. As per the elastic/charts whenever the useDefaultGroupDomain is set to true, it will force to group the series/visualiations groupId's to a default group domain. But, TSVB is not a shared Y domain. So the prop is unneeded.

Further insight:

From the code:
```
const groupId = hasSeparateAxis || isStackedWithinSeries ? seriesGroup.id : mainAxisGroupId;
```
where
```
const mainAxisGroupId = yAxisIdGenerator('main_group');
```
... which indicates that the global default `groupId` is not used by TSVB. Hence, TSVB should have not been using `useDefaultGroupDomain` ever.

Signed-off-by: AbhishekReddy1127 <nallamsa@amazon.com>
(cherry picked from commit 55181d4)
opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 9, 2022
Issue:
#1873

This was happening because of a prop useDefaultGroupDomain. This prop was introduced into the elastic charts to allow clustering for the multiple series which will share a common Y domain i.e for example the stacked and non- stacked bars will have the same Y common domain/axis. As per the elastic/charts whenever the useDefaultGroupDomain is set to true, it will force to group the series/visualiations groupId's to a default group domain. But, TSVB is not a shared Y domain. So the prop is unneeded.

Further insight:

From the code:
```
const groupId = hasSeparateAxis || isStackedWithinSeries ? seriesGroup.id : mainAxisGroupId;
```
where
```
const mainAxisGroupId = yAxisIdGenerator('main_group');
```
... which indicates that the global default `groupId` is not used by TSVB. Hence, TSVB should have not been using `useDefaultGroupDomain` ever.

Signed-off-by: AbhishekReddy1127 <nallamsa@amazon.com>
(cherry picked from commit 55181d4)
kavilla pushed a commit that referenced this pull request Aug 9, 2022
Issue:
#1873

This was happening because of a prop useDefaultGroupDomain. This prop was introduced into the elastic charts to allow clustering for the multiple series which will share a common Y domain i.e for example the stacked and non- stacked bars will have the same Y common domain/axis. As per the elastic/charts whenever the useDefaultGroupDomain is set to true, it will force to group the series/visualiations groupId's to a default group domain. But, TSVB is not a shared Y domain. So the prop is unneeded.

Further insight:

From the code:
```
const groupId = hasSeparateAxis || isStackedWithinSeries ? seriesGroup.id : mainAxisGroupId;
```
where
```
const mainAxisGroupId = yAxisIdGenerator('main_group');
```
... which indicates that the global default `groupId` is not used by TSVB. Hence, TSVB should have not been using `useDefaultGroupDomain` ever.

Signed-off-by: AbhishekReddy1127 <nallamsa@amazon.com>
(cherry picked from commit 55181d4)

Co-authored-by: Abhishek Reddy <62020972+AbhishekReddy1127@users.noreply.github.com>
kavilla pushed a commit that referenced this pull request Aug 9, 2022
Issue:
#1873

This was happening because of a prop useDefaultGroupDomain. This prop was introduced into the elastic charts to allow clustering for the multiple series which will share a common Y domain i.e for example the stacked and non- stacked bars will have the same Y common domain/axis. As per the elastic/charts whenever the useDefaultGroupDomain is set to true, it will force to group the series/visualiations groupId's to a default group domain. But, TSVB is not a shared Y domain. So the prop is unneeded.

Further insight:

From the code:
```
const groupId = hasSeparateAxis || isStackedWithinSeries ? seriesGroup.id : mainAxisGroupId;
```
where
```
const mainAxisGroupId = yAxisIdGenerator('main_group');
```
... which indicates that the global default `groupId` is not used by TSVB. Hence, TSVB should have not been using `useDefaultGroupDomain` ever.

Signed-off-by: AbhishekReddy1127 <nallamsa@amazon.com>
(cherry picked from commit 55181d4)

Co-authored-by: Abhishek Reddy <62020972+AbhishekReddy1127@users.noreply.github.com>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 9, 2022
Issue:
#1873

This was happening because of a prop useDefaultGroupDomain. This prop was introduced into the elastic charts to allow clustering for the multiple series which will share a common Y domain i.e for example the stacked and non- stacked bars will have the same Y common domain/axis. As per the elastic/charts whenever the useDefaultGroupDomain is set to true, it will force to group the series/visualiations groupId's to a default group domain. But, TSVB is not a shared Y domain. So the prop is unneeded.

Further insight:

From the code:
```
const groupId = hasSeparateAxis || isStackedWithinSeries ? seriesGroup.id : mainAxisGroupId;
```
where
```
const mainAxisGroupId = yAxisIdGenerator('main_group');
```
... which indicates that the global default `groupId` is not used by TSVB. Hence, TSVB should have not been using `useDefaultGroupDomain` ever.

Signed-off-by: AbhishekReddy1127 <nallamsa@amazon.com>
(cherry picked from commit 55181d4)
opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 9, 2022
Issue:
#1873

This was happening because of a prop useDefaultGroupDomain. This prop was introduced into the elastic charts to allow clustering for the multiple series which will share a common Y domain i.e for example the stacked and non- stacked bars will have the same Y common domain/axis. As per the elastic/charts whenever the useDefaultGroupDomain is set to true, it will force to group the series/visualiations groupId's to a default group domain. But, TSVB is not a shared Y domain. So the prop is unneeded.

Further insight:

From the code:
```
const groupId = hasSeparateAxis || isStackedWithinSeries ? seriesGroup.id : mainAxisGroupId;
```
where
```
const mainAxisGroupId = yAxisIdGenerator('main_group');
```
... which indicates that the global default `groupId` is not used by TSVB. Hence, TSVB should have not been using `useDefaultGroupDomain` ever.

Signed-off-by: AbhishekReddy1127 <nallamsa@amazon.com>
(cherry picked from commit 55181d4)
kavilla pushed a commit that referenced this pull request Aug 23, 2022
Issue:
#1873

This was happening because of a prop useDefaultGroupDomain. This prop was introduced into the elastic charts to allow clustering for the multiple series which will share a common Y domain i.e for example the stacked and non- stacked bars will have the same Y common domain/axis. As per the elastic/charts whenever the useDefaultGroupDomain is set to true, it will force to group the series/visualiations groupId's to a default group domain. But, TSVB is not a shared Y domain. So the prop is unneeded.

Further insight:

From the code:
```
const groupId = hasSeparateAxis || isStackedWithinSeries ? seriesGroup.id : mainAxisGroupId;
```
where
```
const mainAxisGroupId = yAxisIdGenerator('main_group');
```
... which indicates that the global default `groupId` is not used by TSVB. Hence, TSVB should have not been using `useDefaultGroupDomain` ever.

Signed-off-by: AbhishekReddy1127 <nallamsa@amazon.com>
(cherry picked from commit 55181d4)

Co-authored-by: Abhishek Reddy <62020972+AbhishekReddy1127@users.noreply.github.com>
kavilla pushed a commit that referenced this pull request Aug 23, 2022
Issue:
#1873

This was happening because of a prop useDefaultGroupDomain. This prop was introduced into the elastic charts to allow clustering for the multiple series which will share a common Y domain i.e for example the stacked and non- stacked bars will have the same Y common domain/axis. As per the elastic/charts whenever the useDefaultGroupDomain is set to true, it will force to group the series/visualiations groupId's to a default group domain. But, TSVB is not a shared Y domain. So the prop is unneeded.

Further insight:

From the code:
```
const groupId = hasSeparateAxis || isStackedWithinSeries ? seriesGroup.id : mainAxisGroupId;
```
where
```
const mainAxisGroupId = yAxisIdGenerator('main_group');
```
... which indicates that the global default `groupId` is not used by TSVB. Hence, TSVB should have not been using `useDefaultGroupDomain` ever.

Signed-off-by: AbhishekReddy1127 <nallamsa@amazon.com>
(cherry picked from commit 55181d4)

Co-authored-by: Abhishek Reddy <62020972+AbhishekReddy1127@users.noreply.github.com>
pjfitzgibbons pushed a commit to pjfitzgibbons/OpenSearch-Dashboards that referenced this pull request Oct 24, 2022
…ch-project#2107)

Issue:
opensearch-project#1873

This was happening because of a prop useDefaultGroupDomain. This prop was introduced into the elastic charts to allow clustering for the multiple series which will share a common Y domain i.e for example the stacked and non- stacked bars will have the same Y common domain/axis. As per the elastic/charts whenever the useDefaultGroupDomain is set to true, it will force to group the series/visualiations groupId's to a default group domain. But, TSVB is not a shared Y domain. So the prop is unneeded.

Further insight:

From the code:
```
const groupId = hasSeparateAxis || isStackedWithinSeries ? seriesGroup.id : mainAxisGroupId;
```
where
```
const mainAxisGroupId = yAxisIdGenerator('main_group');
```
... which indicates that the global default `groupId` is not used by TSVB. Hence, TSVB should have not been using `useDefaultGroupDomain` ever.

Signed-off-by: AbhishekReddy1127 <nallamsa@amazon.com>
(cherry picked from commit 55181d4)

Co-authored-by: Abhishek Reddy <62020972+AbhishekReddy1127@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x bug Something isn't working v2.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] TSVB y-axis missing
7 participants