zenno: include rightmost endpoint in stat charts
This commit is contained in:
@@ -39,7 +39,18 @@
|
||||
plotOptions?: Omit<Plot.PlotOptions, 'marks' | 'x' | 'y'>;
|
||||
}
|
||||
|
||||
let { stat, y = [], yArea = [], yLabel, range, xRange, xRule = [], yRule = [], class: className, plotOptions = {} }: Props = $props();
|
||||
let {
|
||||
stat,
|
||||
y = [],
|
||||
yArea = [],
|
||||
yLabel,
|
||||
range,
|
||||
xRange,
|
||||
xRule = [],
|
||||
yRule = [],
|
||||
class: className,
|
||||
plotOptions = {},
|
||||
}: Props = $props();
|
||||
|
||||
let width = $state(0);
|
||||
let height = $state(0);
|
||||
@@ -58,7 +69,7 @@
|
||||
}
|
||||
return 100 * Math.ceil(Math.max(1200, ...xLines) / 100);
|
||||
});
|
||||
const xVal = $derived(d3.range(xMin, xMax, 5));
|
||||
const xVal = $derived(d3.range(xMin, xMax + 1, 5)); // +1 because d3.range does not include the max
|
||||
const thrX = 1200;
|
||||
|
||||
const series = $derived([y].flat(1).filter((s) => s != null));
|
||||
|
||||
Reference in New Issue
Block a user