This is an automated email from the ASF dual-hosted git repository.

enzomartellucci pushed a commit to branch 
revert-37181-fix/89307/last-month-hidden-x-axis-timeseries
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 72ffd684350deb940d45f599e65a26111b7eee38
Author: Enzo Martellucci <[email protected]>
AuthorDate: Mon Jan 19 17:20:03 2026 +0100

    Revert "fix(timeseries): x-axis last month was hidden (#37181)"
    
    This reverts commit f4597be341c3cc982a4c4639800c906be4ec39ba.
---
 .../src/Timeseries/transformProps.ts               |  4 --
 .../test/Timeseries/transformers.test.ts           | 49 +---------------------
 2 files changed, 1 insertion(+), 52 deletions(-)

diff --git 
a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts
 
b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts
index 6058a94800..fe37eea027 100644
--- 
a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts
+++ 
b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts
@@ -551,10 +551,6 @@ export default function transformProps(
       formatter: xAxisFormatter,
       rotate: xAxisLabelRotation,
       interval: xAxisLabelInterval,
-      ...(xAxisType === AxisType.Time && {
-        showMaxLabel: true,
-        alignMaxLabel: 'right',
-      }),
     },
     minorTick: { show: minorTicks },
     minInterval:
diff --git 
a/superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformers.test.ts
 
b/superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformers.test.ts
index 143bdf4389..954221d56c 100644
--- 
a/superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformers.test.ts
+++ 
b/superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformers.test.ts
@@ -16,17 +16,13 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import { CategoricalColorScale, ChartProps } from '@superset-ui/core';
-import { GenericDataType } from '@apache-superset/core/api/core';
-import { supersetTheme } from '@apache-superset/core/ui';
+import { CategoricalColorScale } from '@superset-ui/core';
 import type { SeriesOption } from 'echarts';
 import { EchartsTimeseriesSeriesType } from '../../src';
 import {
   transformSeries,
   transformNegativeLabelsPosition,
 } from '../../src/Timeseries/transformers';
-import transformProps from '../../src/Timeseries/transformProps';
-import { EchartsTimeseriesChartProps } from '../../src/types';
 
 // Mock the colorScale function
 const mockColorScale = jest.fn(
@@ -194,46 +190,3 @@ describe('transformNegativeLabelsPosition', () => {
     expect((result as any)[4].label).toBe(undefined);
   });
 });
-
-test('should configure time axis labels to show max label for last month 
visibility', () => {
-  const formData = {
-    colorScheme: 'bnbColors',
-    datasource: '3__table',
-    granularity_sqla: 'ds',
-    metric: 'sum__num',
-    viz_type: 'my_viz',
-  };
-  const queriesData = [
-    {
-      data: [
-        { sum__num: 100, __timestamp: new Date('2026-01-01').getTime() },
-        { sum__num: 200, __timestamp: new Date('2026-02-01').getTime() },
-        { sum__num: 300, __timestamp: new Date('2026-03-01').getTime() },
-        { sum__num: 400, __timestamp: new Date('2026-04-01').getTime() },
-        { sum__num: 500, __timestamp: new Date('2026-05-01').getTime() },
-      ],
-      colnames: ['sum__num', '__timestamp'],
-      coltypes: [GenericDataType.Numeric, GenericDataType.Temporal],
-    },
-  ];
-  const chartProps = new ChartProps({
-    formData,
-    width: 800,
-    height: 600,
-    queriesData,
-    theme: supersetTheme,
-  });
-
-  const result = transformProps(
-    chartProps as unknown as EchartsTimeseriesChartProps,
-  );
-
-  expect(result.echartOptions.xAxis).toEqual(
-    expect.objectContaining({
-      axisLabel: expect.objectContaining({
-        showMaxLabel: true,
-        alignMaxLabel: 'right',
-      }),
-    }),
-  );
-});

Reply via email to