Options
All
  • Public
  • Public/Protected
  • All
Menu

d3-wind-barbs

Index

Type aliases

PublicWindBarbOptions

PublicWindBarbOptions: DeepPartial<WindBarbSize> & DeepPartial<WindBarbConversionFactor> & DeepPartial<WindBarbBar> & DeepPartial<WindBarbTriangle> & DeepPartial<WindBarbCircle>

Variables

Const ConversionFactors

ConversionFactors: { KmhToKnot: 0.539; MpsToKnot: 1.944; None: 1 } = {KmhToKnot: 0.539,MpsToKnot: 1.944,None: 1,} as const

This library works internally with nautical Knots. So, if your data is in other units you should:

  1. Pass the correct conversion factor as option
  2. Transform your data to knots and ignore the conversionFactor option

This library provides 2 conversion factors:

  1. KmhToKnot - Kilometers per hour to nautical knots
  2. MpsToKnot - Meters per second to nautical knots

None is the default option and will be used if your data is in knots

Be aware that your speed data will be multiplied by conversionFactor

Type declaration

  • KmhToKnot: 0.539
  • MpsToKnot: 1.944
  • None: 1

Object literals

Const DEFAULT_CONFIG

DEFAULT_CONFIG: object

Default configuration. All that properties that you don't provide will be overwritten by the corresponding option of this configuration

see

PublicWindBarbOptions

conversionFactor

conversionFactor: 1 = ConversionFactors.None

rootBarClassName

rootBarClassName: string = "wind-barb-root"

svgId

svgId: string = ""

bar

bar: object

angle

angle: number = 30

fullBarClassName

fullBarClassName: string = "wind-barb-bar-full"

padding

padding: number = 6

shortBarClassName

shortBarClassName: string = "wind-barb-bar-half"

stroke

stroke: string = "#000"

width

width: number = 2

circle

circle: object

className

className: string = "wind-barb-circle"

fill

fill: string = "#FFFFFF00"

radius

radius: number = 10

stroke

stroke: string = "#000"

strokeWidth

strokeWidth: number = 2

size

size: object

height

height: number = 33

width

width: number = 80

triangle

triangle: object

className

className: string = "wind-barb-triangle"

fill

fill: string = "#000"

padding

padding: number = 6

stroke

stroke: string = "#000"

Generated using TypeDoc