Closed weidenka closed 4 years ago
Hi, It is definitely possible. Plotly defines annotations in a layout section: https://plot.ly/javascript/text-and-annotations/#simple-annotation. Once we add builders for that, it is quite easy to add an extension to a plot builder. I will try to add it in a few days if there will be no problems with migration to new version of Kotlin and DataForge-core.
Plotly did not get a lot of love lately, but we plan a significant upgrade this summer by the way.
Thank you so much! Great to hear that you are working on major upgrade.
I'll leave it open. I tried to implement the feature today, but encountered a problem with enums due to https://youtrack.jetbrains.com/issue/KT-37503. As soon as I think of something to do about it, I will implement the feature. Right now it could be done via unsupported feature (https://github.com/mipt-npm/plotly.kt/blob/master/examples/src/main/kotlin/unsupportedFeature.kt) but it is really cumbersome.
Implemented in 0.2.0-dev-1. The example is here: https://github.com/mipt-npm/plotly.kt/blob/dev/examples/src/main/kotlin/annotation/plotWithAnnotation.kt.
I will leave the issue until release. @weidenka please write if you need any specific customization.
That looks perfekt! Thank you so much.
Is it possible to add some text annotations to the plots? Probably similar to the following snippet: