visdesignlab / upset2

UpSet - Visualizing Intersecting Sets
https://upset.multinet.app/
BSD 3-Clause "New" or "Revised" License
54 stars 7 forks source link

Sort matrix sets #138

Closed JakeWags closed 1 year ago

JakeWags commented 1 year ago

Does this PR close any open issues?

Closes #10

Give a longer description of what this PR addresses and why it's needed

This PR adds the ability to sort the matrix header sets via Alphabetical, Size - Ascending, and Size - Descending. This is done via context menu. (( Drag & Drop to be added after #110 , see #137 ))

Provide pictures/videos of the behavior before and after these changes (optional)

https://user-images.githubusercontent.com/35744963/227030280-afd05f73-d705-4175-affe-8848d7558705.mov

After actions taken in above video: image

JSON grammar: Note "sortVisibleBy"

{
  "firstAggregateBy": "None",
  "firstOverlapDegree": 2,
  "secondAggregateBy": "None",
  "secondOverlapDegree": 2,
  "sortVisibleBy": "Size - Ascending",
  "sortBy": "Cardinality",
  "filters": {
    "maxVisible": 3,
    "minVisible": 0,
    "hideEmpty": true
  },
  "visibleSets": [
    "Set_Action",
    "Set_Adventure",
    "Set_Children",
    "Set_Comedy",
    "Set_Crime",
    "Set_Drama",
    "Set_Documentary",
    "Set_SciFi",
    "Set_Romance"
  ],
  "visibleAttributes": [
    "ReleaseDate",
    "AvgRating",
    "Watches"
  ],
  "bookmarkedIntersections": [],
  "plots": {
    "scatterplots": [],
    "histograms": [],
    "wordClouds": []
  }
}

Are there any additional TODOs before this PR is ready to go?

TODOs:

netlify[bot] commented 1 year ago

Deploy Preview for upset2 ready!

Name Link
Latest commit 1a6864f0fa7745312bc1723a80fbbc20546795df
Latest deploy log https://app.netlify.com/sites/upset2/deploys/6421d2398ed00e0008dc46f1
Deploy Preview https://deploy-preview-138--upset2.netlify.app/
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

JakeWags commented 1 year ago

@filemon-mateus Note the grammar change in the JSON file. Will need to update alt-text gen