Skip to content

Documentation & Chartjs Issues #84

Closed Answered by MWedl
Director-Fusion asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,

the variable "findings" contains a list of finding objects. The table in the demo design iterates over the list with a for-loop and creates an iteration variable called "finding" (without "s" at the end).

<tr v-for="finding in findings">

In your code snippet, you are trying to access the per-finding properties on the list. Instead, you need to iterate over the list and map each finding to its CVSS score to use them in the chart. You can use JS Array functions map and filter for that. I don't know how your chart should look like, but you might need something like:

datasets: [{ data: findings.map(f => f.cvss.score) }]

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by aronmolnar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants