Skip to content

Commit

Permalink
Merge pull request #56 from nation3/55-activity-status-indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
aahna-ashina authored Jan 7, 2024
2 parents 22d93e6 + f311bed commit e8feb52
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/pages/[passportId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,20 @@ export default function ProfilePage({ citizen, nationCred, veNation, dework, coo

export function NationCredChart({ nationCred }: any) {
console.info('NationCredChart')

let xAxisAnnotations: any = []
nationCred.is_active_per_week.forEach((isActive: boolean, index: number) => {
console.info(`isActive ${index}`, isActive)
if (isActive) {
// https://apexcharts.com/docs/annotations/
xAxisAnnotations.push({
x: index,
x2: index + 1,
fillColor: '#B3F7CA'
})
}
})

const chartData = {
series: [
{
Expand Down Expand Up @@ -277,6 +291,9 @@ export function NationCredChart({ nationCred }: any) {
toolbar: {
show: false
}
},
annotations: {
xaxis: xAxisAnnotations
}
}
}
Expand All @@ -286,7 +303,7 @@ export function NationCredChart({ nationCred }: any) {
}

export function SourceCredChart({ citizen, sourceCred }: any) {
console.info('NationCredChart')
console.info('SourceCredChart')
const chartData = {
series: [
{
Expand Down

0 comments on commit e8feb52

Please sign in to comment.