-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SHS Dashboard Frontend Chart - Source of visit for each blog page #71 #76
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can refer the main branch for the use of API in the unique visit chart and change this accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made changes in the file
Used analytics.service.js file to get data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe @rohithaug is better qualified to review the charts part of this file. However, the first part of getMetrics()
needs to fixed.
@@ -0,0 +1,54 @@ | |||
import React, { useState, useEffect } from 'react'; | |||
import Chart from 'chart.js/auto'; | |||
import {getMetrics} from '../../../app/services/analytics.service.js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@suryavanshi18 The getMetrics()
is a service written in the backend. Ideally, we would need to request for the data from the backend. In this case, we need to write a fetch()
call to get the required data, else this wouldn't work.
This pull request depends on #7 and #72
Not sure on the api url at line 10 which is used to fetch the api data