Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vis] Ternary Plot of orgs against approach #42

Closed
36 of 45 tasks
rufuspollock opened this issue Dec 2, 2021 · 15 comments
Closed
36 of 45 tasks

[vis] Ternary Plot of orgs against approach #42

rufuspollock opened this issue Dec 2, 2021 · 15 comments

Comments

@rufuspollock
Copy link
Member

rufuspollock commented Dec 2, 2021

Create a ternary plot based on the three (sum to one) "approach to change" dimensions

untitled

Acceptance

  • Ternary diagram based on approach type
  • Can see info on org on hover

Tasks

  • Identify library DONE. Use d3 and d3-ternary https://github.com/davenquinn/d3-ternary
  • Try it out with some simple data
  • Design it (a bit) In progress https://docs.google.com/drawings/d/14MEAE9PC1Vp9rb6QlDejat62PRXS75iprkGOl2ziD7I/edit
  • Explanatory text @rufuspollock or @theo-cox
  • Hover shows label DONE: with simple title (though not obvious)
  • Better hoverable/tool-tip labels DONE
    • Make text a bit smaller
    • Remove border (?)
    • Use a nicer font (either inconsolata/source code mono or our standard font for site which is nunito sans)
  • Try out showing all labels (and paste a screenshot in comments) DONE. See comment below. Basic conclusion is a bit messy but useful. Maybe if we make labels a lot smaller and maybe rotate to 45 degrees
    • Reduce font size to 6 or 7 and retry
    • Rotate labels 45 degrees Not worth it
    • if good we can add a toggle for this (later)
  • Color organization "dots" based on their topic (or activity) so we can see that as well
    • Assign color scale to primary topic Using d3 color scale
    • Apply that to organization dot
    • Show scale with explanation - see https://observablehq.com/@d3/color-legend DONE: currently outside of SVG
      • Can we show this stacked and several font sizes down e.g. like
        image
      • Move legend below chart
  • Add our logo - see public/life-itself-logo.svg (position top right probably) DONE. See screenshot in comment below
    • Move logo in a bit to be above diagram e.g. like
    • Move the life itself logo up a bit - align with top and right if possible (so RHS of logo is flush with right of visible diagram)
  • Make circle size 3 and see what we think (take another screenshot)
  • Re-add the scale on the sides with percentages (and maybe grid) (?) not sure as what are the labels, maybe you need an arrow? drawBasicTernaryPlot
    • Probably remove or significantly change anchor circles
    • re-add anchor labels (and closer)
    • Make anchor labels smaller e.g. size 10
    • Move anchor labels closer to anchor point
    • move inner change back to top (same orientations as before)
    • move red axes arrows out of diagram and make a bit shorter (and same color as axes)
    • bring back a small black dot at the corners (?)
    • maybe make the color of axes a bit "black" e.g. #333
  • have labels to the right of the dots (and closer if possible) (rather than below)
    • don't clip outside of the border (but leave the border for now)

Bonus

Someday maybe

Documentation

@rufuspollock rufuspollock self-assigned this Dec 2, 2021
@rufuspollock rufuspollock added this to In progress in Planning [OLD / DEP] Dec 2, 2021
rufuspollock added a commit that referenced this issue Dec 2, 2021
@rufuspollock rufuspollock changed the title Ternary Plot against social change approach [vis] Ternary Plot of orgs against approach Dec 5, 2021
@rufuspollock
Copy link
Member Author

rufuspollock commented Dec 5, 2021

Results of work so far: https://ecosystem.lifeitself.us/vis

image

@rufuspollock
Copy link
Member Author

@khalilcodes has done a great job on a first pass on coloring and better tool-tips

image

@rufuspollock
Copy link
Member Author

rufuspollock commented Dec 28, 2021

Here's the latest work from @khalilcodes covering:

  • Showing logo
  • Showing labels
  • Showing legend

As we can see, quite messy with the labels because a lot together. No obvious way to fix this ... Could make font smaller and do ellipsis. But not sure this is worth it.

image

@rufuspollock
Copy link
Member Author

rufuspollock commented Dec 29, 2021

Latest version with smaller labels, logo moved etc. Against plan from yesterday which was:

image

@khalilcodes
Copy link
Collaborator

Plan from yesterday:

  • Making circles size 3
  • Put in axes + labels
    • Remove red dots

TBD: Axes labels offset ?
TBD: keep triangle border ?

image

@rufuspollock
Copy link
Member Author

rufuspollock commented Dec 30, 2021

  • move inner change back to top (same orientations as before)
  • have labels to the right of the dots (and closer if possible) (rather than below)
    • don't clip outside of the border (but leave the border for now)
  • move red axes arrows out of diagram and make a bit shorter
  • re-add anchor labels (and closer)
  • bring back a small black dot at the corners (?)
  • maybe make the color of axes a bit "black" e.g. #333
  • Move the life itself logo up a bit - align with top and right if possible (so RHS of logo is flush with right of visible diagram)

vis

@rufuspollock
Copy link
Member Author

@khalilcodes looking really good. Obviously label overlap is an issue so i think worth making a toggle button called e.g. "show all labels" and defaulting this to off (i.e. we don't show all labels). Then i think we are good to go with embedding this on front page.

@khalilcodes
Copy link
Collaborator

khalilcodes commented Jan 17, 2022

@rufuspollock Added the toggle button for show all labels. Require feedback on the following:

  • Positioning of the button, maybe below the chart next to legend ?
  • Button with or without a background ?

vis

@rufuspollock
Copy link
Member Author

rufuspollock commented Jan 17, 2022 via email

@khalilcodes
Copy link
Collaborator

Making the button to a checkbox as recommended turns out to be a better approach. Also repositioning next to the legend. Any tips for checkbox color ?

Notes: The checkbox is outside the svg but is handled in d3. Since D3 and React both manipulate the DOM, using react state is causing rerender issues when toggling. For getting this up and running quickly the easiest way I found is letting d3 handle the change event. More context on the topic can be found here - https://gist.github.com/alexcjohnson/a4b714eee8afd2123ee00cb5b3278a5f . Eventually we would want to implement one of those options for them to play nice together.

Here's the screenshot:
vis_label_checkbox

@rufuspollock
Copy link
Member Author

@khalilcodes looks good. Personally i might put the show all labels under the category labels for clearer UX plus better rendering on small screens but that's minor.

Last point would be change color of "Cultural Change", "Systems Change" to same colors as labels on graph i think.

@khalilcodes
Copy link
Collaborator

khalilcodes commented Jan 19, 2022

something like this ?

vis_with_label_category

or ?

vis_with_label_category_2

@rufuspollock
Copy link
Member Author

rufuspollock commented Jan 20, 2022

@khalilcodes looks good.

Can you now submit a pull request so we get this work in and live on the site - i want to show to other people.

@theo-cox
Copy link
Contributor

@rufuspollock @khalilcodes if it's possible to have this live before next Monday we can include it in our newsletter

rufuspollock added a commit that referenced this issue Jan 24, 2022
@rufuspollock
Copy link
Member Author

FIXED. I think this is now done. Will always be more tweaks and definitely publishable 😄

👏👏 great work @khalilcodes

Planning [OLD / DEP] automation moved this from In progress to Done Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

3 participants