From 4db30754a691a56fb539192e48f3ce4f9f70b289 Mon Sep 17 00:00:00 2001 From: Leon Sorokin Date: Mon, 26 Feb 2024 18:22:36 -0600 Subject: [PATCH] Graph (old): Migrate right y axis to TimeSeries via custom.axisPlacement (#83452) --- .../panel/timeseries/__snapshots__/migrations.test.ts.snap | 4 ++++ public/app/plugins/panel/timeseries/migrations.ts | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/public/app/plugins/panel/timeseries/__snapshots__/migrations.test.ts.snap b/public/app/plugins/panel/timeseries/__snapshots__/migrations.test.ts.snap index 8c4bec6a30b..272f0ec96d0 100644 --- a/public/app/plugins/panel/timeseries/__snapshots__/migrations.test.ts.snap +++ b/public/app/plugins/panel/timeseries/__snapshots__/migrations.test.ts.snap @@ -656,6 +656,10 @@ exports[`Graph Migrations twoYAxis 1`] = ` "id": "max", "value": 25, }, + { + "id": "custom.axisPlacement", + "value": "right", + }, { "id": "custom.axisLabel", "value": "Y222", diff --git a/public/app/plugins/panel/timeseries/migrations.ts b/public/app/plugins/panel/timeseries/migrations.ts index 18c72cb83b3..7acc221794f 100644 --- a/public/app/plugins/panel/timeseries/migrations.ts +++ b/public/app/plugins/panel/timeseries/migrations.ts @@ -658,6 +658,11 @@ function fillY2DynamicValues( } } + props.push({ + id: `custom.axisPlacement`, + value: AxisPlacement.Right, + }); + // Add any custom property const y1G = y1.custom ?? {}; const y2G = y2.custom ?? {};