Skip to content

Commit

Permalink
[BUG] Fix missing y-axis for TSVB (opensearch-project#2079) (opensear…
Browse files Browse the repository at this point in the history
…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 <[email protected]>
(cherry picked from commit 55181d4)

Co-authored-by: Abhishek Reddy <[email protected]>
  • Loading branch information
2 people authored and Peter Fitzgibbons committed Oct 24, 2022
1 parent ca0de28 commit 851ad8e
Showing 1 changed file with 0 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});

if (isCustomDomain) {
Expand Down

0 comments on commit 851ad8e

Please sign in to comment.