Closed hrrs01 closed 1 year ago
I heard this was a feature request, and i wanted it myself, so i added some basic support through a function-plot plugin. Feel free to comment any changes you want me to make.
Great stuff! And great of you working on v2
right away. Looks like a great start to a feature that's been requested quite often. I'll take a look and merge this right away. By auto adjusting you probably mean floating labels that are next to the graph in the plot right? I imagine that's a quite difficult undertaking to properly space all labels and find their positions in the plot. Thanks for contributing!
It is possible to add the name into the tip, by using the render function. So that if you hover over a line, it displays e.g. name: (x: 1.23, y: 1.23)
in addition if you think that would be a cool feature. As of formatting, i was referencing automatic line breaks when the legend tspan gets too long. However, we might just leave it up to the user to make sure it dosent get too bad also.
I think the name: (x,y)
could be doable depending on whether the underlying library exposes some hook for me to use. Line breaks would probably be tough since the library I am using to basically render the entire plot doesn't really let me change the layout. PR looks good, merging this... It will take some further work to get v2 released though
Added a basic legend proof of concept. Should probably make the legend placement and layout auto adjusting.