PhilW
July 26, 2018, 5:19am
1
I see in the annotation example for styling (last one I think) code like
newAnnotation = {
x: point.xaxis.d2l(point.x),
y: point.yaxis.d2l(point.y),
I get that point.??? is coming from the event being fired, but what is d2l etc about? I don’t see any mention of it in the docs but it shows up in a few example codepens.
Thanks in advance!
d2l stands for d ata to l inear coordinates. Those axis methods are part of the official API (yet), so use them at your own risks.
PhilW
July 26, 2018, 8:50pm
3
Thanks Etienne.
Can you explain what x: point.xaxis.d2l(point.x), achieves?
I assume you meant to say that they are NOT official? BTW if they are not official, it seems wrong to use them in official examples (https://plot.ly/javascript/text-and-annotations/#styling-and-formatting-annotations ) !