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 + } +}