Font
public struct Font : Encodable
extension Font: ExpressibleByStringLiteral
Sets the global font.
Note that fonts used in traces and other layout components inherit from the global font.
Note
Used byLayout.font
, Layout.Title.font
, HoverLabel.font
, XAxis.Title.font
,
XAxis.tickFont
, XAxis.RangeSelector.font
, YAxis.Title.font
, YAxis.tickFont
,
Title.font
, Ternary.AAxis.tickFont
, Ternary.BAxis.Title.font
, Ternary.BAxis.tickFont
,
Ternary.CAxis.Title.font
, Ternary.CAxis.tickFont
, Scene.XAxis.Title.font
,
Scene.XAxis.tickFont
, Scene.YAxis.Title.font
, Scene.YAxis.tickFont
,
Scene.ZAxis.Title.font
, Scene.ZAxis.tickFont
, Scene.Annotation.font
,
Scene.Annotation.HoverLabel.font
, Mapbox.Layer.Symbol.textFont
,
Polar.RadialAxis.Title.font
, Polar.RadialAxis.tickFont
, Polar.AngularAxis.tickFont
,
Layout.Legend.font
, LegendTitle.font
, Layout.Annotation.font
,
Layout.Annotation.HoverLabel.font
, Layout.UpdateMenu.font
,
Layout.Slider.CurrentValue.font
, Layout.Slider.font
, ColorBar.tickFont
,
ColorBar.LegendTitle.font
, GradientMarker.ColorBar.tickFont
,
GradientMarker.ColorBar.LegendTitle.font
, Marker.ColorBar.tickFont
,
Marker.ColorBar.LegendTitle.font
, Heatmap<ZData, XYData>.ColorBar.tickFont
, Heatmap<ZData,
XYData>.ColorBar.LegendTitle.font
, Histogram<XData, YData>.Marker.ColorBar.tickFont
,
Histogram<XData, YData>.Marker.ColorBar.LegendTitle.font
, Histogram2D<XData, YData,
ZData>.ColorBar.tickFont
, Histogram2D<XData, YData, ZData>.ColorBar.LegendTitle.font
,
Contours.labelFont
, Histogram2DContour<XData, YData, ZData>.ColorBar.tickFont
,
Histogram2DContour<XData, YData, ZData>.ColorBar.LegendTitle.font
, Contour<ZData, XData,
YData>.Contours.labelFont
, Contour<ZData, XData, YData>.ColorBar.tickFont
, Contour<ZData,
XData, YData>.ColorBar.LegendTitle.font
, ScatterTernary<AData, BData,
CData>.GradientMarker.ColorBar.tickFont
, ScatterTernary<AData, BData,
CData>.GradientMarker.ColorBar.LegendTitle.font
, Funnel<XData,
YData>.Marker.ColorBar.tickFont
, Funnel<XData, YData>.Marker.ColorBar.LegendTitle.font
,
Sunburst<ValuesData>.Marker.ColorBar.tickFont
,
Sunburst<ValuesData>.Marker.ColorBar.LegendTitle.font
,
Treemap<ValuesData>.Marker.ColorBar.tickFont
,
Treemap<ValuesData>.Marker.ColorBar.LegendTitle.font
, Scatter3D<XData, YData,
ZData>.DashedMarkerLine.ColorBar.tickFont
, Scatter3D<XData, YData,
ZData>.DashedMarkerLine.ColorBar.LegendTitle.font
, SymbolicMarker.ColorBar.tickFont
,
SymbolicMarker.ColorBar.LegendTitle.font
, Surface<ZSurfaceData, XYData>.ColorBar.tickFont
,
Surface<ZSurfaceData, XYData>.ColorBar.LegendTitle.font
, Isosurface<XData, YData, ZData,
ValueData>.ColorBar.tickFont
, Isosurface<XData, YData, ZData,
ValueData>.ColorBar.LegendTitle.font
, Volume<XYZData, ValueData>.ColorBar.tickFont
,
Volume<XYZData, ValueData>.ColorBar.LegendTitle.font
, Mesh3D<XData, YData, ZData,
IntensityData, VertexcolorData, FacecolorData>.ColorBar.tickFont
, Mesh3D<XData, YData, ZData,
IntensityData, VertexcolorData, FacecolorData>.ColorBar.LegendTitle.font
, Cone<XYZData,
UVWData>.ColorBar.tickFont
, Cone<XYZData, UVWData>.ColorBar.LegendTitle.font
,
StreamTube<XYZData, UVWData>.ColorBar.tickFont
, StreamTube<XYZData,
UVWData>.ColorBar.LegendTitle.font
, ScatterGeo<CoordinateData,
LocationsData>.GradientMarker.ColorBar.tickFont
, ScatterGeo<CoordinateData,
LocationsData>.GradientMarker.ColorBar.LegendTitle.font
, Choropleth<LocationsData,
ZData>.ColorBar.tickFont
, Choropleth<LocationsData, ZData>.ColorBar.LegendTitle.font
,
ScatterGL<XData, YData>.SymbolicMarker.ColorBar.tickFont
, ScatterGL<XData,
YData>.SymbolicMarker.ColorBar.LegendTitle.font
,
ScatterPlotMatrix.SymbolicMarker.ColorBar.tickFont
,
ScatterPlotMatrix.SymbolicMarker.ColorBar.LegendTitle.font
, HeatmapGL<ZData,
XYData>.ColorBar.tickFont
, HeatmapGL<ZData, XYData>.ColorBar.LegendTitle.font
,
ParallelCoordinates.labelFont
, ParallelCoordinates.tickFont
,
ParallelCoordinates.rangeFont
, ParallelCoordinates.MarkerLine.ColorBar.tickFont
,
ParallelCoordinates.MarkerLine.ColorBar.LegendTitle.font
, ParallelCategories.labelFont
,
ParallelCategories.tickFont
, ParallelCategories.ShapedMarkerLine.ColorBar.tickFont
,
ParallelCategories.ShapedMarkerLine.ColorBar.LegendTitle.font
,
ScatterMapbox<CoordinateData>.SymbolicMarker.ColorBar.tickFont
,
ScatterMapbox<CoordinateData>.SymbolicMarker.ColorBar.LegendTitle.font
,
ScatterMapbox<CoordinateData>.textFont
, ChoroplethMapbox<LocationsData,
ZData>.ColorBar.tickFont
, ChoroplethMapbox<LocationsData, ZData>.ColorBar.LegendTitle.font
,
DensityMapbox<CoordinateData, ZData>.ColorBar.tickFont
, DensityMapbox<CoordinateData,
ZData>.ColorBar.LegendTitle.font
, Sankey.textFont
, Indicator.Title.font
,
Indicator.Number.font
, Indicator.Delta.font
, Indicator.Gauge.Axis.tickFont
, Carpet<XData,
YData, AData, BData>.AAxis.Title.font
, Carpet<XData, YData, AData, BData>.AAxis.tickFont
,
Carpet<XData, YData, AData, BData>.BAxis.Title.font
, Carpet<XData, YData, AData,
BData>.BAxis.tickFont
, Carpet<XData, YData, AData, BData>.font
, ScatterCarpet<AData,
BData>.GradientMarker.ColorBar.tickFont
, ScatterCarpet<AData,
BData>.GradientMarker.ColorBar.LegendTitle.font
, ContourCarpet<ZData, AData,
BData>.Contours.labelFont
, ContourCarpet<ZData, AData, BData>.ColorBar.tickFont
,
ContourCarpet<ZData, AData, BData>.ColorBar.LegendTitle.font
, ScatterPolar<RData,
ThetaData>.GradientMarker.ColorBar.tickFont
, ScatterPolar<RData,
ThetaData>.GradientMarker.ColorBar.LegendTitle.font
, ScatterPolarGL<RData,
ThetaData>.SymbolicMarker.ColorBar.tickFont
, ScatterPolarGL<RData,
ThetaData>.SymbolicMarker.ColorBar.LegendTitle.font
, BarPolar<RData,
ThetaData>.Marker.ColorBar.tickFont
, BarPolar<RData,
ThetaData>.Marker.ColorBar.LegendTitle.font
.
-
HTML font family - the typeface that will be applied by the web browser.
The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren’t available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include Arial, Balto, Courier New, Droid Sans,, Droid Serif, Droid Sans Mono, Gravitas One, Old Standard TT, Open Sans, Overpass, PT Sans Narrow, Raleway, Times New Roman.
Declaration
Swift
public var family: String?
-
Undocumented
Declaration
Swift
public var size: Double?
-
Undocumented
Declaration
Swift
public var color: Color?
-
Creates
Font
object with specified properties.Declaration
Swift
public init(family: String? = nil, size: Double? = nil, color: Color? = nil)
Parameters
family
HTML font family - the typeface that will be applied by the web browser.
size
color
-
Declaration
Swift
public init(stringLiteral: String)