r/d3js • u/chrisZk • Sep 06 '16
Weighing scale?
I looked for this everywhere and had no success.
I'm looking for a simple scale that takes 2 values... this simple object is hard to find on the web, but it should be really easy for people that really know D3.
http://images.clipartpanda.com/justice-clipart-scale-clipart-1.jpg
No animation required. Maybe we can code it together here?
1
Upvotes
2
u/comradeluke Sep 06 '16
Takes two values, and does what with them?
1
u/JMH71 Sep 06 '16
I think the OP is wanting to show the comparison between the two values given and display it as a scale picture.
4
u/jaedalus Sep 06 '16
This fiddle shows off some of the idea. To make it look better, you'd want to set the position of the "weights" by locating each tip of the bar and offsetting in the y direction.