Skip to content

[tmp] (testing PR to be closed) #221340

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
3282b8b
local elastic-charts #2582
walterra Feb 11, 2025
45bb411
remove useLegacyTimeAxis setting and MULTILAYER_TIME_AXIS_STYLE
walterra Feb 11, 2025
36184a4
remove useLegacyTimeAxis for data visualizer
walterra Feb 11, 2025
9e01db3
remove useLegacyTimeAxis for vis_types/xy
walterra Feb 11, 2025
d90a55c
remove useLegacyTimeAxis for chart_expressions
walterra Feb 11, 2025
03f2525
remove useLegacyTimeAxis from uiSettings
walterra Feb 11, 2025
975a133
remove useLegacyTimeAxis from vis_types/timeseries
walterra Feb 11, 2025
0a50a51
remove useLegacyTimeAxis from aiops
walterra Feb 11, 2025
067d4b2
remove useLegacyTimeAxis from data visualizer
walterra Feb 11, 2025
d2b3214
remove useLegacyTimeAxis from data lens
walterra Feb 11, 2025
a6996d7
remove accidentally added file
walterra May 5, 2025
3eb66ca
set elastic charts to v70
walterra May 5, 2025
3306309
update yarn.lock
walterra May 5, 2025
1c65992
linting
walterra May 5, 2025
ec407b0
restore OUTSIDE_RECT_ANNOTATION_WIDTH
walterra May 5, 2025
c46b80f
fix time axis
walterra May 6, 2025
72ee4c4
fix metrics props
walterra May 6, 2025
2654dee
remove export
walterra May 6, 2025
44f416d
restore AxisLabelOrientationSelector
walterra May 6, 2025
1652b39
update snapshots
walterra May 7, 2025
388a2da
tweak outsideDimension
walterra May 7, 2025
178cbef
tweak outsideDimension
walterra May 7, 2025
35d58f6
tweak axis style
walterra May 7, 2025
c2a8918
fix jest tests
walterra May 7, 2025
399e5a4
fix assertions
walterra May 8, 2025
00a5a2c
tmp: update screenshot value assertion
walterra May 9, 2025
235d931
tmp: update screenshot value assertion
walterra May 9, 2025
0bbf680
fix functional test assertions
walterra May 21, 2025
6fd5c95
fix functional test assertions
walterra May 21, 2025
d942845
fix assertions
walterra May 22, 2025
9d1b8c0
fix assertions
walterra May 22, 2025
ca333b6
fix regression in data visualizer column charts
walterra May 23, 2025
e88e53d
revert thresholds
walterra May 23, 2025
3d68b77
restore uploading platform related visual regression test artefacts
walterra May 23, 2025
f850a99
update baseline/tsvb_dashboard.png
walterra May 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .buildkite/scripts/lifecycle/post_command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ if [[ "$IS_TEST_EXECUTION_STEP" == "true" ]]; then
buildkite-agent artifact upload 'test/**/screenshots/diff/*.png'
buildkite-agent artifact upload 'test/**/screenshots/failure/*.png'
buildkite-agent artifact upload 'test/**/screenshots/session/*.png'
buildkite-agent artifact upload 'src/platform/test/**/screenshots/diff/*.png'
buildkite-agent artifact upload 'src/platform/test/**/screenshots/failure/*.png'
buildkite-agent artifact upload 'src/platform/test/**/screenshots/session/*.png'
buildkite-agent artifact upload 'src/platform/test/functional/failure_debug/html/*.html'
buildkite-agent artifact upload 'x-pack/test/**/screenshots/diff/*.png'
buildkite-agent artifact upload 'x-pack/test/**/screenshots/failure/*.png'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
"@elastic/apm-rum": "^5.17.0",
"@elastic/apm-rum-core": "^5.23.0",
"@elastic/apm-rum-react": "^2.0.6",
"@elastic/charts": "69.2.2",
"@elastic/charts": "70.0.1",
"@elastic/datemath": "5.0.3",
"@elastic/ebt": "^1.1.1",
"@elastic/ecs": "^8.11.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ export const TIMELION_TARGET_BUCKETS_ID = 'timelion:target_buckets';

// Visualization settings
export const VISUALIZATION_HEATMAP_MAX_BUCKETS_ID = 'visualization:heatmap:maxBuckets';
export const VISUALIZATION_USE_LEGACY_TIME_AXIS_ID = 'visualization:useLegacyTimeAxis';
export const VISUALIZATION_LEGACY_GAUGE_CHARTS_LIBRARY_ID =
'visualization:visualize:legacyGaugeChartsLibrary';
export const VISUALIZATION_LEGACY_HEATMAP_CHARTS_LIBRARY_ID =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ export const stackManagementSchema: MakeSchemaFrom<UsageStats> = {
type: 'long',
_meta: { description: 'Non-default value of setting.' },
},
'visualization:useLegacyTimeAxis': {
type: 'boolean',
_meta: { description: 'Non-default value of setting.' },
},
'visualization:regionmap:showWarnings': {
type: 'boolean',
_meta: { description: 'Non-default value of setting.' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ export interface UsageStats {
'observability:aiAssistantSimulatedFunctionCalling': boolean;
'observability:aiAssistantSearchConnectorIndexPattern': string;
'visualization:heatmap:maxBuckets': number;
'visualization:useLegacyTimeAxis': boolean;
'visualization:regionmap:showWarnings': boolean;
'visualization:tileMap:maxPrecision': number;
'csv:separator': string;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('CategoryAxisPanel component', () => {
axis,
onPositionChanged,
setCategoryAxis,
useMultiLayerAxis: false,
disableAxisControls: false,
};
});

Expand Down Expand Up @@ -59,8 +59,8 @@ describe('CategoryAxisPanel component', () => {
expect(onPositionChanged).toBeCalledWith(value);
});

it('should disable label options with multilayer axis', () => {
const comp = shallow(<CategoryAxisPanel {...defaultProps} useMultiLayerAxis={true} />);
it('should disable label options with disableAxisControls prop', () => {
const comp = shallow(<CategoryAxisPanel {...defaultProps} disableAxisControls={true} />);
const labelOptions = comp.find(LabelOptions).dive();
const rotateLabelsOption = labelOptions.find({ paramName: 'rotate' });
const filterLabelOption = labelOptions.find({ paramName: 'filter' });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ export interface CategoryAxisPanelProps {
axis: CategoryAxis;
onPositionChanged: (position: Position) => void;
setCategoryAxis: (value: CategoryAxis) => void;
useMultiLayerAxis: boolean;
disableAxisControls: boolean;
}

function CategoryAxisPanel({
axis,
onPositionChanged,
setCategoryAxis,
useMultiLayerAxis,
disableAxisControls,
}: CategoryAxisPanelProps) {
const setAxis = useCallback(
<T extends keyof CategoryAxis>(paramName: T, value: CategoryAxis[T]) => {
Expand Down Expand Up @@ -102,7 +102,7 @@ function CategoryAxisPanel({
axisLabels={axis.labels}
axisFilterCheckboxName={`xAxisFilterLabelsCheckbox${axis.id}`}
setAxisLabel={setAxisLabel}
disableSingleLayerAxisControls={useMultiLayerAxis}
disableAxisControls={disableAxisControls}
/>
)}
</EuiPanel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import { EuiSpacer } from '@elastic/eui';
import { Position } from '@elastic/charts';

import { BUCKET_TYPES, IAggConfig } from '@kbn/data-plugin/public';
import { LEGACY_TIME_AXIS } from '@kbn/charts-plugin/common';
import { getUISettings } from '../../../../services';

import { VisParams, ValueAxis, SeriesParam, CategoryAxis } from '../../../../types';
import { ValidationVisOptionsProps } from '../../common';
Expand Down Expand Up @@ -298,12 +296,10 @@ function MetricsAxisOptions(props: ValidationVisOptionsProps<VisParams>) {
const xAxisIsHorizontal =
stateParams.categoryAxes[0].position === Position.Bottom ||
stateParams.categoryAxes[0].position === Position.Top;
const useLegacyTimeAxis = getUISettings().get(LEGACY_TIME_AXIS, false);
const linearOrStackedBars = stateParams.seriesParams.every(
({ mode, type }) => type !== 'histogram' || (type === 'histogram' && mode === 'stacked')
);
const useMultiLayerAxis =
xAxisIsHorizontal && isTimeViz && !useLegacyTimeAxis && linearOrStackedBars;
const disableAxisControls = xAxisIsHorizontal && isTimeViz && linearOrStackedBars;

return isTabSelected ? (
<>
Expand All @@ -329,7 +325,7 @@ function MetricsAxisOptions(props: ValidationVisOptionsProps<VisParams>) {
axis={stateParams.categoryAxes[0]}
onPositionChanged={onCategoryAxisPositionChanged}
setCategoryAxis={setCategoryAxis}
useMultiLayerAxis={useMultiLayerAxis}
disableAxisControls={disableAxisControls}
/>
</>
) : null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ export interface LabelOptionsProps {
axisLabels: Labels;
axisFilterCheckboxName: string;
setAxisLabel: SetAxisLabel;
disableSingleLayerAxisControls?: boolean;
disableAxisControls?: boolean;
}

function LabelOptions({
axisLabels,
axisFilterCheckboxName,
setAxisLabel,
disableSingleLayerAxisControls,
disableAxisControls,
}: LabelOptionsProps) {
const setAxisLabelRotate = useCallback(
(paramName: 'rotate', value: Labels['rotate']) => {
Expand All @@ -42,16 +42,15 @@ function LabelOptions({
);

const rotateOptions = useMemo(getRotateOptions, []);
const multilayerAxisTooltipText = disableSingleLayerAxisControls
const axisTooltipText = disableAxisControls
? i18n.translate(
'visTypeXy.controls.pointSeries.categoryAxis.axisLabelsOptionsMultilayer.disabled',
{
defaultMessage: 'This option can be configured only with non-time-based axes',
}
)
: undefined;
const axisLabelControlDisabled = !axisLabels.show || disableSingleLayerAxisControls;

const axisLabelControlDisabled = !axisLabels.show || disableAxisControls;
return (
<>
<EuiSpacer size="m" />
Expand Down Expand Up @@ -82,14 +81,14 @@ function LabelOptions({
paramName="filter"
value={axisLabels.filter}
setValue={setAxisLabel}
tooltip={multilayerAxisTooltipText}
tooltip={axisTooltipText}
/>

<EuiSpacer size="m" />

<EuiFlexGroup gutterSize="s">
<EuiFlexItem>
<EuiToolTip content={multilayerAxisTooltipText} delay="long" position="right">
<EuiToolTip content={axisTooltipText} delay="long" position="right">
<SelectOption
disabled={axisLabelControlDisabled}
label={i18n.translate('visTypeXy.controls.pointSeries.categoryAxis.alignLabel', {
Expand All @@ -104,7 +103,7 @@ function LabelOptions({
</EuiToolTip>
</EuiFlexItem>
<EuiFlexItem>
<EuiToolTip content={multilayerAxisTooltipText} delay="long" position="right">
<EuiToolTip content={axisTooltipText} delay="long" position="right">
<TruncateLabelsOption
disabled={axisLabelControlDisabled}
value={axisLabels.truncate}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ describe('XYChart component', () => {
syncColors: false,
syncTooltips: false,
syncCursor: true,
useLegacyTimeAxis: false,
eventAnnotationService: eventAnnotationServiceMock,
renderComplete: jest.fn(),
timeFormat: 'MMM D, YYYY @ HH:mm:ss.SSS',
Expand Down Expand Up @@ -324,7 +323,8 @@ describe('XYChart component', () => {

const axisStyle = instance.find(Axis).first().prop('timeAxisLayerCount');

expect(axisStyle).toBe(0);
// This prop is no longer set, since v70 Elastic Charts takes care of this internally.
expect(axisStyle).toBe(undefined);
});
test('it should enable the new time axis for a line time layer when isHistogram is set to true', () => {
const timeLayerArgs = createArgsWithLayers([defaultTimeLayer]);
Expand All @@ -344,7 +344,8 @@ describe('XYChart component', () => {

const axisStyle = instance.find(Axis).first().prop('timeAxisLayerCount');

expect(axisStyle).toBe(2);
// This prop is no longer set, since v70 Elastic Charts takes care of this internally.
expect(axisStyle).toBe(undefined);
});
test('it should disable the new time axis for a vertical bar with break down dimension', () => {
const timeLayer: DataLayerConfig = {
Expand All @@ -368,7 +369,8 @@ describe('XYChart component', () => {

const axisStyle = instance.find(Axis).first().prop('timeAxisLayerCount');

expect(axisStyle).toBe(0);
// This prop is no longer set, since v70 Elastic Charts takes care of this internally.
expect(axisStyle).toBe(undefined);
});

test('it should enable the new time axis for a stacked vertical bar with break down dimension', () => {
Expand All @@ -394,7 +396,8 @@ describe('XYChart component', () => {

const axisStyle = instance.find(Axis).first().prop('timeAxisLayerCount');

expect(axisStyle).toBe(2);
// This prop is no longer set, since v70 Elastic Charts takes care of this internally.
expect(axisStyle).toBe(undefined);
});
});
describe('endzones', () => {
Expand Down
Loading