@@ -23,8 +23,6 @@ import {
2323 Settings ,
2424 TooltipType ,
2525 XYChartElementEvent ,
26- AxisStyle ,
27- RecursivePartial ,
2826} from '@elastic/charts' ;
2927import { IUiSettingsClient } from 'kibana/public' ;
3028import {
@@ -37,7 +35,7 @@ import { DataCharts$, DataChartsMessage } from '../../services/use_saved_search'
3735import { FetchStatus } from '../../../../types' ;
3836import { DiscoverServices } from '../../../../../build_services' ;
3937import { useDataState } from '../../utils/use_data_state' ;
40- import { LEGACY_TIME_AXIS } from '../../../../../../../charts/common' ;
38+ import { LEGACY_TIME_AXIS , MULTILAYER_TIME_AXIS_STYLE } from '../../../../../../../charts/common' ;
4139
4240export interface DiscoverHistogramProps {
4341 savedSearchData$ : DataCharts$ ;
@@ -184,24 +182,6 @@ export function DiscoverHistogram({
184182
185183 const useLegacyTimeAxis = uiSettings . get ( LEGACY_TIME_AXIS , false ) ;
186184
187- const xAxisStyle : RecursivePartial < AxisStyle > = useLegacyTimeAxis
188- ? { }
189- : {
190- tickLine : {
191- size : 0.0001 ,
192- strokeWidth : 1 ,
193- padding : 4 ,
194- visible : true ,
195- } ,
196- tickLabel : {
197- padding : 0 ,
198- alignment : {
199- vertical : Position . Bottom ,
200- horizontal : Position . Left ,
201- } ,
202- } ,
203- } ;
204-
205185 return (
206186 < React . Fragment >
207187 < div className = "dscHistogram" data-test-subj = "discoverChart" data-time-range = { timeRangeText } >
@@ -227,7 +207,7 @@ export function DiscoverHistogram({
227207 position = { Position . Bottom }
228208 tickFormat = { formatXValue }
229209 timeAxisLayerCount = { useLegacyTimeAxis ? 0 : 2 }
230- style = { xAxisStyle }
210+ style = { useLegacyTimeAxis ? { } : MULTILAYER_TIME_AXIS_STYLE }
231211 />
232212 < CurrentTime isDarkMode = { isDarkMode } domainEnd = { domainEnd } />
233213 < Endzones
0 commit comments