Skip to content
Snippets Groups Projects
Unverified Commit f1e72f42 authored by Mahatthana (Kelvin) Nomsawadi's avatar Mahatthana (Kelvin) Nomsawadi Committed by GitHub
Browse files

Fix gauge chart overflow (#25860)

parent 4178697d
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,7 @@ import {
calculateRelativeValueAngle,
calculateSegmentLabelPosition,
calculateSegmentLabelTextAnchor,
gaugeSorter,
} from "./utils";
import type { Card, Data, GaugeLabelData, Position } from "./types";
......@@ -41,7 +42,7 @@ export default function GaugeContainer({
const columnSettings =
settings.column_settings &&
populateDefaultColumnSettings(Object.values(settings.column_settings)[0]);
const segments = settings["gauge.segments"];
const segments = [...settings["gauge.segments"]].sort(gaugeSorter);
const segmentMinValue = segments[0].min;
const segmentMaxValue = segments[segments.length - 1].max;
......
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