Skip to content

Commit 7e86cf8

Browse files
opensearch-trigger-bot[bot]github-actions[bot]ruanyl
authored
Fix state-timeline legend toggle not working (#11267) (#11284)
(cherry picked from commit 7a14cda) Signed-off-by: Luna Liu <lunalzm@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Yulong Ruan <ruanyl@amazon.com>
1 parent 5a667ad commit 7e86cf8

File tree

1 file changed

+4
-0
lines changed
  • src/plugins/explore/public/components/visualizations/state_timeline

1 file changed

+4
-0
lines changed

src/plugins/explore/public/components/visualizations/state_timeline/to_expression.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ export const createNumericalStateTimeline = (
105105
createBaseConfig({
106106
title: `${colorMapping?.name} by ${axisConfig.yAxis?.name} and ${axisConfig.xAxis?.name}`,
107107
addTrigger: false,
108+
legend: { show: styleOptions.addLegend },
108109
}),
109110
buildAxisConfigs,
110111
createStateTimeLineSpec({ styles: styleOptions, groupField }),
@@ -334,6 +335,7 @@ export const createCategoricalStateTimeline = (
334335
createBaseConfig({
335336
title: `${colorMapping?.name} by ${axisConfig.yAxis?.name} and ${axisConfig.xAxis?.name}`,
336337
addTrigger: false,
338+
legend: { show: styleOptions.addLegend },
337339
}),
338340
buildAxisConfigs,
339341
createStateTimeLineSpec({ styles: styleOptions, groupField }),
@@ -565,6 +567,7 @@ export const createSingleCategoricalStateTimeline = (
565567
createBaseConfig({
566568
title: `${colorMapping?.name} by ${axisConfig.xAxis?.name}`,
567569
addTrigger: false,
570+
legend: { show: styleOptions.addLegend },
568571
}),
569572
buildAxisConfigs,
570573
createStateTimeLineSpec({ styles: styleOptions, groupField: undefined }),
@@ -810,6 +813,7 @@ export const createSingleNumericalStateTimeline = (
810813
createBaseConfig({
811814
title: `${colorMapping?.name} by ${axisConfig.xAxis?.name}`,
812815
addTrigger: false,
816+
legend: { show: styleOptions.addLegend },
813817
}),
814818
buildAxisConfigs,
815819
createStateTimeLineSpec({ styles: styleOptions, groupField: undefined }),

0 commit comments

Comments
 (0)