From b4cb5518457f32c6f8ff24b20874f582583ee806 Mon Sep 17 00:00:00 2001 From: Abhishek Reddy <62020972+AbhishekReddy1127@users.noreply.github.com> Date: Tue, 9 Aug 2022 12:24:52 -0700 Subject: [PATCH] [BUG] Fix missing y-axis for TSVB (#2079) Issue: https://github.com/opensearch-project/OpenSearch-Dashboards/issues/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 (cherry picked from commit 55181d464490e0518bac532bdc8ee38e57f135d2) --- .../public/application/components/vis_types/timeseries/vis.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/plugins/vis_type_timeseries/public/application/components/vis_types/timeseries/vis.js b/src/plugins/vis_type_timeseries/public/application/components/vis_types/timeseries/vis.js index 0fd58769ea76..db0dc4de77a6 100644 --- a/src/plugins/vis_type_timeseries/public/application/components/vis_types/timeseries/vis.js +++ b/src/plugins/vis_type_timeseries/public/application/components/vis_types/timeseries/vis.js @@ -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) {