From d944216b44057a7814cfdae6ad4e6d579a70f21e Mon Sep 17 00:00:00 2001 From: Akshay Iyyadurai Balasundaram Date: Mon, 9 Feb 2026 00:26:16 +0530 Subject: [PATCH] bugfix(histogram): configure max without min in x axis Signed-off-by: Akshay Iyyadurai Balasundaram --- histogramchart/schemas/histogram.cue | 5 ++++- histogramchart/schemas/tests/valid/histogram_only_max.json | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 histogramchart/schemas/tests/valid/histogram_only_max.json diff --git a/histogramchart/schemas/histogram.cue b/histogramchart/schemas/histogram.cue index cb7bc3da..49b59faf 100644 --- a/histogramchart/schemas/histogram.cue +++ b/histogramchart/schemas/histogram.cue @@ -21,7 +21,10 @@ kind: "HistogramChart" spec: close({ format?: common.#format min?: number - max?: number & >= min + max?: number + if min != _|_ && max != _|_ { + max: >= min + } thresholds?: common.#thresholds logBase?: 2 | 10 }) diff --git a/histogramchart/schemas/tests/valid/histogram_only_max.json b/histogramchart/schemas/tests/valid/histogram_only_max.json new file mode 100644 index 00000000..e9927a4b --- /dev/null +++ b/histogramchart/schemas/tests/valid/histogram_only_max.json @@ -0,0 +1,6 @@ +{ + "kind": "HistogramChart", + "spec": { + "max": 10 + } +}