plotly/plotly_types

Source   Edit  

Types

Annotation = ref object
  x*: float
  xshift*: float
  y*: float
  yshift*: float
  text*: string
  showarrow*: bool
Source   Edit  
Axis = ref object
  title*: string
  font*: Font
  domain*: seq[float64]
  side*: PlotSide
  rangeslider*: RangeSlider
  range*: tuple[start, stop: float]
  hideticklabels*: bool
  gridColor*: Color
  gridWidth*: int
  ty*: AxisType
Source   Edit  
AxisType {.pure.} = enum
  Default = "-", Log = "log"
Source   Edit  
BarAlign {.pure.} = enum
  None, Edge, Center
Source   Edit  
BarMode {.pure.} = enum
  Unset = "", Stack = "stack", Overlay = "overlay"
Source   Edit  
ColorMap {.pure.} = enum
  None = "", Custom = "Custom", Greys = "Greys", YlGnBu = "YlGnBu",
  Greens = "Greens", YlOrRd = "YlOrRd", Bluered = "Bluered", RdBu = "RdBu",
  Reds = "Reds", Blues = "Blues", Picnic = "Picnic", Rainbow = "Rainbow",
  Portland = "Portland", Jet = "Jet", Hot = "Hot", Blackbody = "Blackbody",
  Earth = "Earth", Electric = "Electric", Viridis = "Viridis",
  Cividis = "Cividis"
Source   Edit  
CustomColorMap = ref object
  rawColors*: seq[tuple[r, g, b: float64]]
  name*: string
Source   Edit  
Domain = tuple[left, bottom, width, height: float]
Source   Edit  
DomainAlt = tuple[left, bottom, right, top: float]
Source   Edit  
ErrorBar[T] = ref object
  visible*: bool
  color*: Color
  thickness*: float
  width*: float
  case kind*: ErrorBarKind
  of ebkConstantSym:
    value*: T
  of ebkConstantAsym:
    valueMinus*: T
    valuePlus*: T
  of ebkPercentSym:
    percent*: T
  of ebkPercentAsym:
    percentMinus*: T
    percentPlus*: T
  of ebkSqrt:
    nil
  of ebkArraySym:
    errors*: seq[T]
  of ebkArrayAsym:
    errorsMinus*: seq[T]
    errorsPlus*: seq[T]
Source   Edit  
ErrorBarKind = enum
  ebkConstantSym, ebkConstantAsym, ebkPercentSym, ebkPercentAsym, ebkSqrt,
  ebkArraySym, ebkArrayAsym
Source   Edit  
Font = ref object
  family*: string
  size*: int
  color*: Color
Source   Edit  
HistFunc {.pure.} = enum
  Count = "count", Sum = "sum", Avg = "avg", Min = "min", Max = "max"
Source   Edit  
HistNorm {.pure.} = enum
  None = "", Percent = "percent", Probability = "probability",
  Density = "density", ProbabilityDensity = "probability density"
Source   Edit  
HoverMode {.pure.} = enum
  Closest = "closest", X = "x", Y = "y", False = "false"
Source   Edit  
Layout = ref object
  title*: string
  width*: int
  height*: int
  hovermode*: HoverMode
  annotations*: seq[Annotation]
  autosize*: bool
  showlegend*: bool
  legend*: Legend
  font*: Font
  xaxis*: Axis
  yaxis*: Axis
  yaxis2*: Axis
  barmode*: BarMode
  backgroundColor*: Color
  paperColor*: Color
Source   Edit  
Legend = ref object
  x*: float
  y*: float
  font*: Font
  backgroundColor*: Color
  borderColor*: Color
  borderWidth*: int
  orientation*: Orientation
Source   Edit  
Marker[T] = ref object
  size*: seq[T]
  color*: seq[Color]
  colorVals*: seq[T]
  colormap*: ColorMap
  customColormap*: CustomColorMap
Source   Edit  
Orientation {.pure.} = enum
  None = "", Vertical = "v", Horizontal = "h"
Source   Edit  
Plot[T] = ref object
  traces*: seq[Trace[T]]
  layout*: Layout
Source   Edit  
PlotFill {.pure.} = enum
  Unset = "", ToNextY = "tonexty", ToZeroY = "tozeroy", ToSelf = "toself"
Source   Edit  
PlotJson = ref object
  traces*: JsonNode
  layout*: JsonNode
Source   Edit  
PlotMode {.pure.} = enum
  Lines = "lines", Markers = "markers", LinesMarkers = "lines+markers"
Source   Edit  
PlotSide {.pure.} = enum
  Unset = "", Left = "left", Right = "right"
Source   Edit  
PlotType {.pure.} = enum
  Scatter = "scatter", ScatterGL = "scattergl", Bar = "bar",
  Histogram = "histogram", Box = "box", HeatMap = "heatmap",
  HeatMapGL = "heatmapgl", Candlestick = "candlestick", Contour = "contour"
Source   Edit  
PredefinedCustomMaps = enum
  Other, ViridisZeroWhite, Plasma, PlasmaZeroWhite, Magma, MagmaZeroWhite,
  Inferno, InfernoZeroWhite, WhiteToBlack
Source   Edit  
RangeSlider = ref object
  visible*: bool
Source   Edit  
Trace[T] = ref object
  xs*: seq[T]
  ys*: seq[T]
  zs*: seq[seq[T]]
  xs_err*: ErrorBar[T]
  ys_err*: ErrorBar[T]
  marker*: Marker[T]
  text*: seq[string]
  opacity*: float
  mode*: PlotMode
  fill*: PlotFill
  name*: string
  xaxis*: string
  yaxis*: string
  case
  of HeatMap, HeatMapGL:
    colormap*: ColorMap
    customColormap*: CustomColorMap
    zmin*: float
    zmax*: float
  of Contour:
    colorscale*: ColorMap
    customColorscale*: CustomColorMap
    contours*: tuple[start, stop, size: float]
    heatmap*: bool
    smoothing*: float
  of Candlestick:
    open*: seq[T]
    high*: seq[T]
    low*: seq[T]
    close*: seq[T]
  of Histogram:
    histFunc*: HistFunc
    histNorm*: HistNorm
    cumulative*: bool
    nBins*: int
    bins*: tuple[start, stop: float]
    binSize*: float
  of Bar:
    width*: T
    widths*: seq[T]
    autoWidth*: bool
    align*: BarAlign
    orientation*: Orientation
  of Scatter, ScatterGL:
    lineWidth*: int
    hideLine*: bool
  else:
    nil
Source   Edit