Skip to content

Commit

Permalink
(fix) fix usage charts
Browse files Browse the repository at this point in the history
  • Loading branch information
NikhilShahi committed Sep 14, 2022
1 parent 169a3ad commit 30146aa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion frontend/src/components/Endpoint/UsageChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ const EndpointUsageChart: React.FC<EndpointUsageChartProps> = React.memo(
const [isLargerThan440] = useMediaQuery("(min-width: 440px)")
let options = {
responsive: true,
interaction: {
mode: "nearest",
intersect: false,
},
plugins: {
legend: {
display: false,
Expand All @@ -51,7 +55,7 @@ const EndpointUsageChart: React.FC<EndpointUsageChartProps> = React.memo(
},
time: {
unit: "day",
tooltipFormat: "yyyy-MM-dd h:mm a",
tooltipFormat: "yyyy-MM-dd",
displayFormats: {
millisecond: "h:mm a",
second: "h:mm a",
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/components/Home/UsageChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ const UsageChart: React.FC<UsageChartProps> = React.memo(
({ usageData, ...props }) => {
const options = {
responsive: true,
interaction: {
mode: "nearest",
intersect: false,
},
plugins: {
legend: {
display: false,
Expand All @@ -57,7 +61,7 @@ const UsageChart: React.FC<UsageChartProps> = React.memo(
},
time: {
unit: "day",
tooltipFormat: "yyyy-MM-dd h:mm a",
tooltipFormat: "yyyy-MM-dd",
displayFormats: {
millisecond: "h:mm a",
second: "h:mm a",
Expand Down

0 comments on commit 30146aa

Please sign in to comment.