feat: x axis interval control to show ALL ticks on timeseries charts (#33729)

This commit is contained in:
Evan Rusackas
2025-06-10 21:40:56 -06:00
committed by GitHub
parent 86e7139245
commit e05ccb3824
17 changed files with 56 additions and 0 deletions

View File

@@ -41,6 +41,7 @@ import {
truncateXAxis,
xAxisBounds,
xAxisLabelRotation,
xAxisLabelInterval,
} from '../controls';
const {
@@ -368,6 +369,7 @@ const config: ControlPanelConfig = {
[<ControlSubSectionHeader>{t('X Axis')}</ControlSubSectionHeader>],
['x_axis_time_format'],
[xAxisLabelRotation],
[xAxisLabelInterval],
...richTooltipSection,
// eslint-disable-next-line react/jsx-key
[<ControlSubSectionHeader>{t('Y Axis')}</ControlSubSectionHeader>],

View File

@@ -195,6 +195,7 @@ export default function transformProps(
tooltipSortByMetric,
xAxisBounds,
xAxisLabelRotation,
xAxisLabelInterval,
groupby,
groupbyB,
xAxis: xAxisOrig,
@@ -554,6 +555,7 @@ export default function transformProps(
axisLabel: {
formatter: xAxisFormatter,
rotate: xAxisLabelRotation,
interval: xAxisLabelInterval,
},
minorTick: { show: minorTicks },
minInterval:

View File

@@ -61,6 +61,7 @@ export type EchartsMixedTimeseriesFormData = QueryFormData & {
zoomable: boolean;
richTooltip: boolean;
xAxisLabelRotation: number;
xAxisLabelInterval?: number | string;
colorScheme?: string;
// types specific to Query A and Query B
area: boolean;
@@ -133,6 +134,7 @@ export const DEFAULT_FORM_DATA: EchartsMixedTimeseriesFormData = {
zoomable: TIMESERIES_DEFAULTS.zoomable,
richTooltip: TIMESERIES_DEFAULTS.richTooltip,
xAxisLabelRotation: TIMESERIES_DEFAULTS.xAxisLabelRotation,
xAxisLabelInterval: TIMESERIES_DEFAULTS.xAxisLabelInterval,
...DEFAULT_TITLE_FORM_DATA,
};