Browse Source

fix(explore) Adding units to charts yaxis based on visualize param. (#77014)

<img width="1015" alt="Screenshot 2024-09-05 at 12 55 18 PM"
src="https://github.com/user-attachments/assets/d124ed4c-6c30-4988-8e84-fd3f97de2885">

Co-authored-by: Abdullah Khan <abdullahkhan@PG9Y57YDXQ.local>
Abdullah Khan 6 months ago
parent
commit
a95497eedd
1 changed files with 2 additions and 5 deletions
  1. 2 5
      static/app/views/explore/charts/index.tsx

+ 2 - 5
static/app/views/explore/charts/index.tsx

@@ -6,7 +6,7 @@ import {CompactSelect} from 'sentry/components/compactSelect';
 import {CHART_PALETTE} from 'sentry/constants/chartPalette';
 import {t} from 'sentry/locale';
 import {space} from 'sentry/styles/space';
-import {tooltipFormatter} from 'sentry/utils/discover/charts';
+import {aggregateOutputType} from 'sentry/utils/discover/fields';
 import {MutableSearch} from 'sentry/utils/tokenizeSearch';
 import usePageFilters from 'sentry/utils/usePageFilters';
 import {useChartInterval} from 'sentry/views/explore/hooks/useChartInterval';
@@ -92,11 +92,8 @@ export function ExploreCharts({query}: ExploreChartsProps) {
               loading={series.isPending}
               chartColors={CHART_PALETTE[2]}
               type={chartType}
-              aggregateOutputFormat="number"
+              aggregateOutputFormat={aggregateOutputType(visualize)}
               showLegend
-              tooltipFormatterOptions={{
-                valueFormatter: value => tooltipFormatter(value),
-              }}
             />
           </ChartPanel>
         </ChartContainer>