SafetyGraphics / hep-explorer

Interactive Graphic for Exploring Liver Function Data in Clinical Trials
https://safetygraphics.github.io/hep-explorer/test/
MIT License
10 stars 3 forks source link

Make legend for point size #274

Open jwildfire opened 5 years ago

jwildfire commented 5 years ago

Draw a point size legend onLayout(), and update it in OnResize/customizePoints/setPointSize()

Basic idea is in this example and lots of others ...

jwildfire commented 3 years ago

As discussed, we're looking for a legend above the chart that is visible when the point size control is not set to "None".

The general workflow here is probably something like this:

Note that the size scale is defined in setPointSize(), and is bound to the chart object as chart.sizeScale. You'll probably want to re-use it to create the legend. Feel free to just put the code to create the legend in that setPointSize() file or to break it out in to its own method saved elsewhere and called from onResize()