Skip to content

Commit

Permalink
fix options
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Feb 14, 2024
1 parent d1222f1 commit c367d7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/google-analytics/docs/components/trendNumber.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {html} from "npm:htl";

export function trendNumber(data, {focus, value, format} = {}) {
export function trendNumber(data, {focus, value, ...options} = {}) {
const focusIndex = data.findIndex((d) => d === focus);
return formatTrend(focus[value] - data[focusIndex - 1]?.[value], format);
return formatTrend(focus[value] - data[focusIndex - 1]?.[value], options);
}

export function formatTrend(
Expand Down

0 comments on commit c367d7f

Please sign in to comment.