Skip to content
Snippets Groups Projects
Unverified Commit 0cfbe932 authored by Nick Fitzpatrick's avatar Nick Fitzpatrick Committed by GitHub
Browse files

Changing graph viz settings toggles to inline, updating radio buttons to (#25664)

* Changing graph viz settings toggles to inline, updating radio buttons to
segmentedControl inputs

* PR Feedback
parent 2d4edfb1
No related merge requests found
......@@ -39,8 +39,8 @@ export function SegmentedControl({
options,
onChange,
fullWidth = false,
inactiveColor = "text-medium",
variant = "fill-text",
inactiveColor = "text-dark",
variant = "fill-background",
...props
}) {
const id = useMemo(() => _.uniqueId("radio-"), []);
......
......@@ -342,6 +342,8 @@ export const GRAPH_GOAL_SETTINGS = {
title: t`Goal line`,
widget: "toggle",
default: false,
inline: true,
marginBottom: "1rem",
},
"graph.goal_value": {
section: t`Display`,
......@@ -369,6 +371,8 @@ export const GRAPH_GOAL_SETTINGS = {
return !insights || insights.length === 0;
},
useRawSeries: true,
inline: true,
marginBottom: "1rem",
},
};
......@@ -380,17 +384,19 @@ export const GRAPH_DISPLAY_VALUES_SETTINGS = {
getHidden: (series, vizSettings) =>
vizSettings["stackable.stack_type"] === "normalized",
default: false,
inline: true,
marginBottom: "1rem",
},
"graph.label_value_frequency": {
section: t`Display`,
title: t`Values to show`,
widget: "radio",
widget: "segmentedControl",
getHidden: (series, vizSettings) =>
vizSettings["graph.show_values"] !== true ||
vizSettings["stackable.stack_type"] === "normalized",
props: {
options: [
{ name: t`As many as can fit nicely`, value: "fit" },
{ name: t`Some`, value: "fit" },
{ name: t`All`, value: "all" },
],
},
......@@ -399,8 +405,8 @@ export const GRAPH_DISPLAY_VALUES_SETTINGS = {
},
"graph.label_value_formatting": {
section: t`Display`,
title: t`Value formatting`,
widget: "radio",
title: t`Auto formatting`,
widget: "segmentedControl",
getHidden: (series, vizSettings) =>
vizSettings["graph.show_values"] !== true ||
vizSettings["stackable.stack_type"] === "normalized",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment