Skip to content

Commit

Permalink
[BUG] Fix missing y-axis for TSVB (#2079) (#2105)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
1 parent 06a5338 commit 3bf21c9
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 3bf21c9

Please sign in to comment.