Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

suryavanshi18
Copy link
Collaborator

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

This pull request depends on #7 and #72
Not sure on the api url at line 10
@rohithaug
Copy link
Owner

After merging #74 and #75 pull from main and fix the API error that you have and can then merge

Copy link
Owner

@rohithaug rohithaug left a 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.

Copy link
Collaborator Author

@suryavanshi18 suryavanshi18 left a 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

Copy link
Collaborator

@vishaln15 vishaln15 left a 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';
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants