-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FEAT: started working on the bar chart for the lang count
- Loading branch information
1 parent
6c6e35d
commit 311eebf
Showing
6 changed files
with
136 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import React from "react"; | ||
import { | ||
Card, | ||
Flex, | ||
ProgressCircle, | ||
BadgeDelta, | ||
} from "@tremor/react"; | ||
import {FollowingAnalysis} from "@/Interface/api.interface"; | ||
|
||
const FollowingProgress: React.FC<FollowingAnalysis> = ({ | ||
followingCount, | ||
increaseOrDecrease, | ||
}) => { | ||
|
||
return ( | ||
<Card className="followerCard" style={{ backgroundColor: "#000000" }}> | ||
<h2 className="followerCardTitle font-mono">Following</h2> | ||
<Flex> | ||
<ProgressCircle | ||
className="followerProgressCircle" | ||
value={followingCount} | ||
radius={40} | ||
strokeWidth={12} | ||
tooltip="Following" | ||
color={"purple"} | ||
|
||
> <span className="text-md text-gray-700 font-large ">{followingCount}</span></ProgressCircle> | ||
{increaseOrDecrease === "no_change" ? ( | ||
<BadgeDelta deltaType="unchanged" isIncreasePositive={true} | ||
size="sm" color={"green"}>No Change</BadgeDelta> | ||
) : ( | ||
<BadgeDelta | ||
className="followerBadge" | ||
deltaType="moderateIncrease" | ||
isIncreasePositive={true} | ||
size="sm" | ||
color={""} | ||
> | ||
Increase | ||
</BadgeDelta> | ||
)} | ||
</Flex> | ||
</Card> | ||
); | ||
}; | ||
|
||
export default FollowingProgress; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from "react"; | ||
import { BarChart , Card } from "@tremor/react"; | ||
import { LanguageCountAnalysis } from "@/Interface/api.interface"; | ||
|
||
|
||
|
||
export const LanguageCount: React.FC<LanguageCountAnalysis> =({LangName , LangCount})=>{ | ||
return <Card> | ||
<BarChart | ||
className="mt-6" | ||
data={LangName} | ||
index="name" | ||
categories={["Number of threatened species"]} | ||
colors={["blue"]} | ||
valueFormatter={LangCount} | ||
yAxisWidth={48} | ||
/> | ||
|
||
</Card> | ||
} | ||
export default LanguageCount; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
interface FollowerAnalysis{ | ||
// follower-analysis.interface.ts | ||
export interface FollowerAnalysis { | ||
followerCount: number; | ||
increaseOrDecrease: String | ||
increaseOrDecrease: string; // Use lowercase 'string' | ||
} | ||
|
||
export interface FollowingAnalysis { | ||
followingCount: number; | ||
increaseOrDecrease: string; | ||
} | ||
|
||
} | ||
|
||
export default FollowerAnalysis; | ||
export interface LanguageCountAnalysis{ | ||
[language:string]:any; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters