Skip to content

Commit

Permalink
Fix Autonomy order
Browse files Browse the repository at this point in the history
  • Loading branch information
lmcnulty committed Jul 25, 2023
1 parent 395b2c5 commit 1c67fd5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions site/gatsby-site/src/pages/summaries/cset-charts.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,11 @@ function GroupBarChart({ groups, attributeShortName, classifications, namespace,

const groupNames = Object.keys(groups);

const autonomySort = (a, b) => Number(a.id[8] || 0) - Number(b.id[8] || 0);

const options = {
data: {
order:
attributeShortName == 'Autonomy Level' ? (a, b) => Number(a[8]) - Number(b[8]) : undefined,
order: attributeShortName == 'Autonomy Level' ? autonomySort : undefined,
x: 'x',
columns: [
['x', ...groupNames],
Expand Down

0 comments on commit 1c67fd5

Please sign in to comment.