Skip to content

Commit

Permalink
[Feature] Update the default filters for top pages visualization
Browse files Browse the repository at this point in the history
  • Loading branch information
levinmr committed Feb 25, 2025
1 parent 277442d commit 2f7bb01
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions js/components/visualizations/TopPagesCircleGraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ import FilterSelect from "../select/FilterSelect";
*/
function TopPagesCircleGraph({ dataHrefBase }) {
const reportNameFilters = [
["Page Views", "top-viewed-pages"],
["Active Users", "top-pages-by-active-user"],
["Page Views", "top-viewed-pages"],
];
const reportPeriodFilters = [
["Yesterday", "yesterday"],
["7 Days", "7-days"],
["30 Days", "30-days"],
["90 Days", "90-days"],
["Last 7 Days", "7-days"],
["Last 30 Days", "30-days"],
["Last 90 Days", "90-days"],
["Current Calendar Year", "current-year"],
["Current Fiscal Year", "current-fiscal-year"],
["Previous Calendar Year", "previous-year"],
Expand All @@ -47,7 +47,7 @@ function TopPagesCircleGraph({ dataHrefBase }) {
reportNameFilters[0],
);
const [currentReportPeriodFilter, setCurrentReportPeriodFilter] = useState(
reportPeriodFilters[2],
reportPeriodFilters[1],
);
const ref = useRef(null);
const [maxHostnameFilter, setMaxHostnameFilter] = useState(
Expand Down Expand Up @@ -349,7 +349,7 @@ function TopPagesCircleGraph({ dataHrefBase }) {
<h3 className="text-center">Time Period</h3>
<FilterSelect
filters={reportPeriodFilters}
defaultFilterValue={reportPeriodFilters[2][1] || ""}
defaultFilterValue={reportPeriodFilters[1][1] || ""}
onChange={reportPeriodFilterChangeHandler}
name={"top pages chart time period filter"}
className="margin-x-auto maxw-full text--overflow-ellipsis"
Expand Down

0 comments on commit 2f7bb01

Please sign in to comment.