Skip to main content

Function: withAxisLogos()

Call Signature​

withAxisLogos(figure, axis, o): PlotlyFigure

Defined in: packages/sdvplot/src/plotly.ts:458

Team logos (or wordmarks, markType) in place of the tick labels of a category axis. xref/yref pick the subplot axes (default "x"/"y"); the category axis is the one named by axis. Pixel sizing uses layout.width/layout.height; when unset it assumes Plotly's 700x450 default, which is approximate under autosize (images stay correctly placed in paper/data units). x: images hang under the subplot in its y domain units (height of that subplot, exact), and margin.b grows by what they reach below the paper; under an upper subplot they hang into the subplot below. y: images sit left of the plot in data y; the range is pinned to the category bands so sizey = h × span. Hover still names each category: the labels are hidden (showticklabels: false), not blanked, because Plotly's hover reads a tick's text. With an unresolved category only those keep a tick, so a drawn one loses its tick mark and grid line (both off by default on a category axis).

Parameters​

figure​

PlotlyFigure

axis​

"x" | "y"

o​

PlotlyAxisOptions

Returns​

PlotlyFigure

Call Signature​

withAxisLogos<F>(figure, axis, o): F

Defined in: packages/sdvplot/src/plotly.ts:459

Team logos (or wordmarks, markType) in place of the tick labels of a category axis. xref/yref pick the subplot axes (default "x"/"y"); the category axis is the one named by axis. Pixel sizing uses layout.width/layout.height; when unset it assumes Plotly's 700x450 default, which is approximate under autosize (images stay correctly placed in paper/data units). x: images hang under the subplot in its y domain units (height of that subplot, exact), and margin.b grows by what they reach below the paper; under an upper subplot they hang into the subplot below. y: images sit left of the plot in data y; the range is pinned to the category bands so sizey = h × span. Hover still names each category: the labels are hidden (showticklabels: false), not blanked, because Plotly's hover reads a tick's text. With an unresolved category only those keep a tick, so a drawn one loses its tick mark and grid line (both off by default on a category axis).

Type Parameters​

F​

F extends object

Parameters​

figure​

F

axis​

"x" | "y"

o​

PlotlyAxisOptions

Returns​

F