
Summary: This example shows how to create candlestick charts in F#.
let's first create some data for the purpose of creating example charts:
#r "nuget: FSharp.Data"
#r "nuget: Deedle"
open FSharp.Data
open Deedle
open Plotly.NET
open Plotly.NET.TraceObjects
let data =
Http.RequestString @"https://raw.githubusercontent.com/plotly/datasets/master/finance-charts-apple.csv"
|> fun csv -> Frame.ReadCsvString(csv,true,separators=",")
let openData = data.["AAPL.Open"] |> Series.values |> Array.ofSeq
let highData = data.["AAPL.High"] |> Series.values |> Array.ofSeq
let lowData = data.["AAPL.Low"] |> Series.values |> Array.ofSeq
let closeData = data.["AAPL.Close"] |> Series.values |> Array.ofSeq
let dateData = data |> Frame.getCol "Date" |> Series.values |> Seq.map System.DateTime.Parse |> Array.ofSeq
let candles = [for i in 0 .. 29 -> dateData.[i], StockData.create openData.[i] highData.[i] lowData.[i] closeData.[i]]
A candlestick chart is useful for plotting stock prices over time. A candle
is a group of high, open, close and low values over a period of time, e.g. 1 minute, 5 minute, hour, day, etc..
The x-axis is usually dateime values and y is a sequence of candle structures.
open Plotly.NET
open Plotly.NET.TraceObjects
let candles1 =
Chart.Candlestick(
openData |> Seq.take 30,
highData |> Seq.take 30,
lowData |> Seq.take 30,
closeData |> Seq.take 30,
dateData |> Seq.take 30
)
let candles2 =
Chart.Candlestick(
candles,
IncreasingColor = Color.fromKeyword Cyan,
DecreasingColor = Color.fromKeyword Gray
)
If you want to hide the rangeslider, use withXAxisRangeSlider
and hide it:
open Plotly.NET.LayoutObjects
let rangeslider = RangeSlider.init(Visible=false)
let candles3 =
candles2
|> Chart.withXAxisRangeSlider rangeslider
Multiple items
namespace FSharp
--------------------
namespace Microsoft.FSharp
Multiple items
namespace FSharp.Data
--------------------
namespace Microsoft.FSharp.Data
namespace Deedle
namespace Plotly
namespace Plotly.NET
namespace Plotly.NET.TraceObjects
val data: Frame<int,string>
type Http =
static member AsyncRequest: url: string * ?query: (string * string) list * ?headers: seq<string * string> * ?httpMethod: string * ?body: HttpRequestBody * ?cookies: seq<string * string> * ?cookieContainer: CookieContainer * ?silentHttpErrors: bool * ?silentCookieErrors: bool * ?responseEncodingOverride: string * ?customizeHttpRequest: (HttpWebRequest -> HttpWebRequest) * ?timeout: int -> Async<HttpResponse>
static member AsyncRequestStream: url: string * ?query: (string * string) list * ?headers: seq<string * string> * ?httpMethod: string * ?body: HttpRequestBody * ?cookies: seq<string * string> * ?cookieContainer: CookieContainer * ?silentHttpErrors: bool * ?silentCookieErrors: bool * ?customizeHttpRequest: (HttpWebRequest -> HttpWebRequest) * ?timeout: int -> Async<HttpResponseWithStream>
static member AsyncRequestString: url: string * ?query: (string * string) list * ?headers: seq<string * string> * ?httpMethod: string * ?body: HttpRequestBody * ?cookies: seq<string * string> * ?cookieContainer: CookieContainer * ?silentHttpErrors: bool * ?silentCookieErrors: bool * ?responseEncodingOverride: string * ?customizeHttpRequest: (HttpWebRequest -> HttpWebRequest) * ?timeout: int -> Async<string>
static member Request: url: string * ?query: (string * string) list * ?headers: seq<string * string> * ?httpMethod: string * ?body: HttpRequestBody * ?cookies: seq<string * string> * ?cookieContainer: CookieContainer * ?silentHttpErrors: bool * ?silentCookieErrors: bool * ?responseEncodingOverride: string * ?customizeHttpRequest: (HttpWebRequest -> HttpWebRequest) * ?timeout: int -> HttpResponse
static member RequestStream: url: string * ?query: (string * string) list * ?headers: seq<string * string> * ?httpMethod: string * ?body: HttpRequestBody * ?cookies: seq<string * string> * ?cookieContainer: CookieContainer * ?silentHttpErrors: bool * ?silentCookieErrors: bool * ?customizeHttpRequest: (HttpWebRequest -> HttpWebRequest) * ?timeout: int -> HttpResponseWithStream
static member RequestString: url: string * ?query: (string * string) list * ?headers: seq<string * string> * ?httpMethod: string * ?body: HttpRequestBody * ?cookies: seq<string * string> * ?cookieContainer: CookieContainer * ?silentHttpErrors: bool * ?silentCookieErrors: bool * ?responseEncodingOverride: string * ?customizeHttpRequest: (HttpWebRequest -> HttpWebRequest) * ?timeout: int -> string
<summary>
Utilities for working with network via HTTP. Includes methods for downloading
resources with specified headers, query parameters and HTTP body
</summary>
Multiple items
static member Http.RequestString: url: string * ?query: (string * string) list * ?headers: seq<string * string> * ?httpMethod: string * ?body: HttpRequestBody * ?cookies: seq<string * string> * ?cookieContainer: System.Net.CookieContainer * ?silentHttpErrors: bool * ?silentCookieErrors: bool * ?responseEncodingOverride: string * ?customizeHttpRequest: (System.Net.HttpWebRequest -> System.Net.HttpWebRequest) * ?timeout: int -> string
--------------------
static member Http.RequestString: url: string * ?query: (string * string) list * ?headers: seq<string * string> * ?httpMethod: string * ?body: HttpRequestBody * ?cookies: seq<string * string> * ?cookieContainer: System.Net.CookieContainer * ?silentHttpErrors: bool * ?silentCookieErrors: bool * ?responseEncodingOverride: string * ?customizeHttpRequest: (System.Net.HttpWebRequest -> System.Net.HttpWebRequest) * ?timeout: int -> string
val csv: string
Multiple items
module Frame
from Deedle
--------------------
type Frame =
inherit DynamicObj
new: unit -> Frame
--------------------
type Frame<'TRowKey,'TColumnKey (requires equality and equality)> =
interface IDynamicMetaObjectProvider
interface INotifyCollectionChanged
interface IFsiFormattable
interface IFrame
new: rowIndex: IIndex<'TRowKey> * columnIndex: IIndex<'TColumnKey> * data: IVector<IVector> * indexBuilder: IIndexBuilder * vectorBuilder: IVectorBuilder -> Frame<'TRowKey,'TColumnKey> + 1 overload
member AddColumn: column: 'TColumnKey * series: seq<'V> -> unit + 3 overloads
member AggregateRowsBy: groupBy: seq<'TColumnKey> * aggBy: seq<'TColumnKey> * aggFunc: Func<Series<'TRowKey,'a>,'b> -> Frame<int,'TColumnKey>
member Clone: unit -> Frame<'TRowKey,'TColumnKey>
member ColumnApply: f: Func<Series<'TRowKey,'T>,ISeries<'TRowKey>> -> Frame<'TRowKey,'TColumnKey> + 1 overload
member DropColumn: column: 'TColumnKey -> unit
...
--------------------
new: unit -> Frame
--------------------
new: names: seq<'TColumnKey> * columns: seq<ISeries<'TRowKey>> -> Frame<'TRowKey,'TColumnKey>
new: rowIndex: Indices.IIndex<'TRowKey> * columnIndex: Indices.IIndex<'TColumnKey> * data: IVector<IVector> * indexBuilder: Indices.IIndexBuilder * vectorBuilder: Vectors.IVectorBuilder -> Frame<'TRowKey,'TColumnKey>
static member Frame.ReadCsvString: csvString: string * ?hasHeaders: bool * ?inferTypes: bool * ?inferRows: int * ?schema: string * ?separators: string * ?culture: string * ?maxRows: int * ?missingValues: string[] * ?preferOptions: bool -> Frame<int,string>
val openData: float[]
Multiple items
module Series
from Deedle
--------------------
type Series =
static member ofNullables: values: seq<Nullable<'a0>> -> Series<int,'a0> (requires default constructor and value type and 'a0 :> ValueType)
static member ofObservations: observations: seq<'c * 'd> -> Series<'c,'d> (requires equality)
static member ofOptionalObservations: observations: seq<'K * 'a1 option> -> Series<'K,'a1> (requires equality)
static member ofValues: values: seq<'a> -> Series<int,'a>
--------------------
type Series<'K,'V (requires equality)> =
interface IFsiFormattable
interface ISeries<'K>
new: index: IIndex<'K> * vector: IVector<'V> * vectorBuilder: IVectorBuilder * indexBuilder: IIndexBuilder -> Series<'K,'V> + 3 overloads
member After: lowerExclusive: 'K -> Series<'K,'V>
member Aggregate: aggregation: Aggregation<'K> * keySelector: Func<DataSegment<Series<'K,'V>>,'TNewKey> * valueSelector: Func<DataSegment<Series<'K,'V>>,OptionalValue<'R>> -> Series<'TNewKey,'R> (requires equality) + 1 overload
member AsyncMaterialize: unit -> Async<Series<'K,'V>>
member Before: upperExclusive: 'K -> Series<'K,'V>
member Between: lowerInclusive: 'K * upperInclusive: 'K -> Series<'K,'V>
member Compare: another: Series<'K,'V> -> Series<'K,Diff<'V>>
member Convert: forward: Func<'V,'R> * backward: Func<'R,'V> -> Series<'K,'R>
...
--------------------
new: pairs: seq<System.Collections.Generic.KeyValuePair<'K,'V>> -> Series<'K,'V>
new: keys: seq<'K> * values: seq<'V> -> Series<'K,'V>
new: keys: 'K[] * values: 'V[] -> Series<'K,'V>
new: index: Indices.IIndex<'K> * vector: IVector<'V> * vectorBuilder: Vectors.IVectorBuilder * indexBuilder: Indices.IIndexBuilder -> Series<'K,'V>
val values: series: Series<'K,'T> -> seq<'T> (requires equality)
module Array
from Microsoft.FSharp.Collections
<summary>Contains operations for working with arrays.</summary>
<remarks>
See also <a href="https://docs.microsoft.com/dotnet/fsharp/language-reference/arrays">F# Language Guide - Arrays</a>.
</remarks>
val ofSeq: source: seq<'T> -> 'T[]
<summary>Builds a new array from the given enumerable object.</summary>
<param name="source">The input sequence.</param>
<returns>The array of elements from the sequence.</returns>
<exception cref="T:System.ArgumentNullException">Thrown when the input sequence is null.</exception>
<example id="ofseq-1"><code lang="fsharp">
let inputs = seq { 1; 2; 5 }
inputs |> Array.ofSeq
</code>
Evaluates to <c>[| 1; 2; 5 |]</c>.
</example>
val highData: float[]
val lowData: float[]
val closeData: float[]
val dateData: System.DateTime[]
val getCol: column: 'C -> frame: Frame<'R,'C> -> Series<'R,'V> (requires equality and equality)
module Seq
from Microsoft.FSharp.Collections
<summary>Contains operations for working with values of type <see cref="T:Microsoft.FSharp.Collections.seq`1" />.</summary>
val map: mapping: ('T -> 'U) -> source: seq<'T> -> seq<'U>
<summary>Builds a new collection whose elements are the results of applying the given function
to each of the elements of the collection. The given function will be applied
as elements are demanded using the <c>MoveNext</c> method on enumerators retrieved from the
object.</summary>
<remarks>The returned sequence may be passed between threads safely. However,
individual IEnumerator values generated from the returned sequence should not be accessed concurrently.</remarks>
<param name="mapping">A function to transform items from the input sequence.</param>
<param name="source">The input sequence.</param>
<returns>The result sequence.</returns>
<exception cref="T:System.ArgumentNullException">Thrown when the input sequence is null.</exception>
<example id="item-1"><code lang="fsharp">
let inputs = ["a"; "bbb"; "cc"]
inputs |> Seq.map (fun x -> x.Length)
</code>
Evaluates to a sequence yielding the same results as <c>seq { 1; 3; 2 }</c></example>
namespace System
Multiple items
[<Struct>]
type DateTime =
new: year: int * month: int * day: int -> unit + 10 overloads
member Add: value: TimeSpan -> DateTime
member AddDays: value: float -> DateTime
member AddHours: value: float -> DateTime
member AddMilliseconds: value: float -> DateTime
member AddMinutes: value: float -> DateTime
member AddMonths: months: int -> DateTime
member AddSeconds: value: float -> DateTime
member AddTicks: value: int64 -> DateTime
member AddYears: value: int -> DateTime
...
<summary>Represents an instant in time, typically expressed as a date and time of day.</summary>
--------------------
System.DateTime ()
(+0 other overloads)
System.DateTime(ticks: int64) : System.DateTime
(+0 other overloads)
System.DateTime(ticks: int64, kind: System.DateTimeKind) : System.DateTime
(+0 other overloads)
System.DateTime(year: int, month: int, day: int) : System.DateTime
(+0 other overloads)
System.DateTime(year: int, month: int, day: int, calendar: System.Globalization.Calendar) : System.DateTime
(+0 other overloads)
System.DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int) : System.DateTime
(+0 other overloads)
System.DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, kind: System.DateTimeKind) : System.DateTime
(+0 other overloads)
System.DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, calendar: System.Globalization.Calendar) : System.DateTime
(+0 other overloads)
System.DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, millisecond: int) : System.DateTime
(+0 other overloads)
System.DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, millisecond: int, kind: System.DateTimeKind) : System.DateTime
(+0 other overloads)
System.DateTime.Parse(s: string) : System.DateTime
System.DateTime.Parse(s: string, provider: System.IFormatProvider) : System.DateTime
System.DateTime.Parse(s: string, provider: System.IFormatProvider, styles: System.Globalization.DateTimeStyles) : System.DateTime
System.DateTime.Parse(s: System.ReadOnlySpan<char>, ?provider: System.IFormatProvider, ?styles: System.Globalization.DateTimeStyles) : System.DateTime
val candles: (System.DateTime * StockData) list
val i: int
type StockData =
{
Open: float
High: float
Low: float
Close: float
}
static member Create: o: float * h: float * l: float * c: float -> StockData
static member create: o: float -> h: float -> l: float -> c: float -> StockData
static member StockData.create: o: float -> h: float -> l: float -> c: float -> StockData
val candles1: GenericChart.GenericChart
type Chart =
static member AnnotatedHeatmap: zData: seq<#seq<'a1>> * annotationText: seq<#seq<string>> * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?X: seq<#IConvertible> * ?XGap: int * ?Y: seq<#IConvertible> * ?YGap: int * ?Text: 'a5 * ?MultiText: seq<'a5> * ?ColorBar: ColorBar * ?ColorScale: Colorscale * ?ShowScale: bool * ?ReverseScale: bool * ?ZSmooth: SmoothAlg * ?Transpose: bool * ?UseWebGL: bool * ?ReverseYAxis: bool * ?UseDefaults: bool -> GenericChart (requires 'a1 :> IConvertible and 'a5 :> IConvertible) + 1 overload
static member Area: x: seq<#IConvertible> * y: seq<#IConvertible> * ?ShowMarkers: bool * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?MultiOpacity: seq<float> * ?Text: 'a2 * ?MultiText: seq<'a2> * ?TextPosition: TextPosition * ?MultiTextPosition: seq<TextPosition> * ?MarkerColor: Color * ?MarkerColorScale: Colorscale * ?MarkerOutline: Line * ?MarkerSymbol: MarkerSymbol * ?MultiMarkerSymbol: seq<MarkerSymbol> * ?Marker: Marker * ?LineColor: Color * ?LineColorScale: Colorscale * ?LineWidth: float * ?LineDash: DrawingStyle * ?Line: Line * ?StackGroup: string * ?Orientation: Orientation * ?GroupNorm: GroupNorm * ?FillColor: Color * ?UseWebGL: bool * ?UseDefaults: bool -> GenericChart (requires 'a2 :> IConvertible) + 1 overload
static member Bar: values: seq<#IConvertible> * ?Keys: seq<#IConvertible> * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?MultiOpacity: seq<float> * ?Text: 'a2 * ?MultiText: seq<'a2> * ?MarkerColor: Color * ?MarkerColorScale: Colorscale * ?MarkerOutline: Line * ?MarkerPatternShape: PatternShape * ?MultiMarkerPatternShape: seq<PatternShape> * ?MarkerPattern: Pattern * ?Marker: Marker * ?Base: #IConvertible * ?Width: 'a4 * ?MultiWidth: seq<'a4> * ?TextPosition: TextPosition * ?MultiTextPosition: seq<TextPosition> * ?UseDefaults: bool -> GenericChart (requires 'a2 :> IConvertible and 'a4 :> IConvertible) + 1 overload
static member BoxPlot: ?X: seq<#IConvertible> * ?Y: seq<#IConvertible> * ?Name: string * ?ShowLegend: bool * ?Text: 'a2 * ?MultiText: seq<'a2> * ?FillColor: Color * ?MarkerColor: Color * ?Marker: Marker * ?Opacity: float * ?WhiskerWidth: float * ?BoxPoints: BoxPoints * ?BoxMean: BoxMean * ?Jitter: float * ?PointPos: float * ?Orientation: Orientation * ?OutlineColor: Color * ?OutlineWidth: float * ?Outline: Line * ?AlignmentGroup: string * ?OffsetGroup: string * ?Notched: bool * ?NotchWidth: float * ?QuartileMethod: QuartileMethod * ?UseDefaults: bool -> GenericChart (requires 'a2 :> IConvertible) + 2 overloads
static member Bubble: x: seq<#IConvertible> * y: seq<#IConvertible> * sizes: seq<int> * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?MultiOpacity: seq<float> * ?Text: 'a2 * ?MultiText: seq<'a2> * ?TextPosition: TextPosition * ?MultiTextPosition: seq<TextPosition> * ?MarkerColor: Color * ?MarkerColorScale: Colorscale * ?MarkerOutline: Line * ?MarkerSymbol: MarkerSymbol * ?MultiMarkerSymbol: seq<MarkerSymbol> * ?Marker: Marker * ?LineColor: Color * ?LineColorScale: Colorscale * ?LineWidth: float * ?LineDash: DrawingStyle * ?Line: Line * ?StackGroup: string * ?Orientation: Orientation * ?GroupNorm: GroupNorm * ?UseWebGL: bool * ?UseDefaults: bool -> GenericChart (requires 'a2 :> IConvertible) + 1 overload
static member Candlestick: ``open`` : seq<#IConvertible> * high: seq<#IConvertible> * low: seq<#IConvertible> * close: seq<#IConvertible> * x: seq<#IConvertible> * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?Text: 'f * ?MultiText: seq<'f> * ?Line: Line * ?IncreasingColor: Color * ?Increasing: FinanceMarker * ?DecreasingColor: Color * ?Decreasing: FinanceMarker * ?WhiskerWidth: float * ?UseDefaults: bool -> GenericChart (requires 'f :> IConvertible) + 1 overload
static member Column: values: seq<#IConvertible> * ?Keys: seq<#IConvertible> * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?MultiOpacity: seq<float> * ?Text: 'a2 * ?MultiText: seq<'a2> * ?MarkerColor: Color * ?MarkerColorScale: Colorscale * ?MarkerOutline: Line * ?MarkerPatternShape: PatternShape * ?MultiMarkerPatternShape: seq<PatternShape> * ?MarkerPattern: Pattern * ?Marker: Marker * ?Base: #IConvertible * ?Width: 'a4 * ?MultiWidth: seq<'a4> * ?TextPosition: TextPosition * ?MultiTextPosition: seq<TextPosition> * ?UseDefaults: bool -> GenericChart (requires 'a2 :> IConvertible and 'a4 :> IConvertible) + 1 overload
static member Contour: zData: seq<#seq<'a1>> * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?X: seq<#IConvertible> * ?Y: seq<#IConvertible> * ?Text: 'a4 * ?MultiText: seq<'a4> * ?ColorBar: ColorBar * ?ColorScale: Colorscale * ?ShowScale: bool * ?ReverseScale: bool * ?Transpose: bool * ?ContourLineColor: Color * ?ContourLineDash: DrawingStyle * ?ContourLineSmoothing: float * ?ContourLine: Line * ?ContoursColoring: ContourColoring * ?ContoursOperation: ConstraintOperation * ?ContoursType: ContourType * ?ShowContourLabels: bool * ?ContourLabelFont: Font * ?Contours: Contours * ?FillColor: Color * ?NContours: int * ?UseDefaults: bool -> GenericChart (requires 'a1 :> IConvertible and 'a4 :> IConvertible)
static member Funnel: x: seq<#IConvertible> * y: seq<#IConvertible> * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?Width: float * ?Offset: float * ?Text: 'a2 * ?MultiText: seq<'a2> * ?TextPosition: TextPosition * ?MultiTextPosition: seq<TextPosition> * ?Orientation: Orientation * ?AlignmentGroup: string * ?OffsetGroup: string * ?MarkerColor: Color * ?MarkerOutline: Line * ?Marker: Marker * ?TextInfo: TextInfo * ?ConnectorLineColor: Color * ?ConnectorLineStyle: DrawingStyle * ?ConnectorFillColor: Color * ?ConnectorLine: Line * ?Connector: FunnelConnector * ?InsideTextFont: Font * ?OutsideTextFont: Font * ?UseDefaults: bool -> GenericChart (requires 'a2 :> IConvertible)
static member Heatmap: zData: seq<#seq<'a1>> * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?X: seq<#IConvertible> * ?XGap: int * ?Y: seq<#IConvertible> * ?YGap: int * ?Text: 'a4 * ?MultiText: seq<'a4> * ?ColorBar: ColorBar * ?ColorScale: Colorscale * ?ShowScale: bool * ?ReverseScale: bool * ?ZSmooth: SmoothAlg * ?Transpose: bool * ?UseWebGL: bool * ?ReverseYAxis: bool * ?UseDefaults: bool -> GenericChart (requires 'a1 :> IConvertible and 'a4 :> IConvertible) + 1 overload
...
static member Chart.Candlestick: stockTimeSeries: seq<System.DateTime * StockData> * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?Text: 'a * ?MultiText: seq<'a> * ?Line: Line * ?IncreasingColor: Color * ?Increasing: FinanceMarker * ?DecreasingColor: Color * ?Decreasing: FinanceMarker * ?WhiskerWidth: float * ?UseDefaults: bool -> GenericChart.GenericChart (requires 'a :> System.IConvertible)
static member Chart.Candlestick: ``open`` : seq<#System.IConvertible> * high: seq<#System.IConvertible> * low: seq<#System.IConvertible> * close: seq<#System.IConvertible> * x: seq<#System.IConvertible> * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?Text: 'f * ?MultiText: seq<'f> * ?Line: Line * ?IncreasingColor: Color * ?Increasing: FinanceMarker * ?DecreasingColor: Color * ?Decreasing: FinanceMarker * ?WhiskerWidth: float * ?UseDefaults: bool -> GenericChart.GenericChart (requires 'f :> System.IConvertible)
val take: count: int -> source: seq<'T> -> seq<'T>
<summary>Returns the first N elements of the sequence.</summary>
<remarks>Throws <c>InvalidOperationException</c>
if the count exceeds the number of elements in the sequence. <c>Seq.truncate</c>
returns as many items as the sequence contains instead of throwing an exception.</remarks>
<param name="count">The number of items to take.</param>
<param name="source">The input sequence.</param>
<returns>The result sequence.</returns>
<exception cref="T:System.ArgumentNullException">Thrown when the input sequence is null.</exception>
<exception cref="T:System.ArgumentException">Thrown when the input sequence is empty and the count is greater than zero.</exception>
<exception cref="T:System.InvalidOperationException">Thrown when count exceeds the number of elements
in the sequence.</exception>
<example id="take-1"><code lang="fsharp">
let inputs = ["a"; "b"; "c"; "d"]
inputs |> Seq.take 2
</code>
Evaluates to a sequence yielding the same results as <c>["a"; "b"]</c></example>
<example id="take-2"><code lang="fsharp">
let inputs = ["a"; "b"; "c"; "d"]
inputs |> Seq.take 6
</code>
Throws <c>InvalidOperationException</c>.
</example>
<example id="take-3"><code lang="fsharp">
let inputs = ["a"; "b"; "c"; "d"]
inputs |> Seq.take 0
</code>
Evaluates to a sequence yielding no results.
</example>
module GenericChart
from Plotly.NET
<summary>
Module to represent a GenericChart
</summary>
val toChartHTML: gChart: GenericChart.GenericChart -> string
<summary>
Converts a GenericChart to it HTML representation. The div layer has a default size of 600 if not specified otherwise.
</summary>
val candles2: GenericChart.GenericChart
type Color =
override Equals: other: obj -> bool
override GetHashCode: unit -> int
static member fromARGB: a: int -> r: int -> g: int -> b: int -> Color
static member fromColorScaleValues: c: seq<#IConvertible> -> Color
static member fromColors: c: seq<Color> -> Color
static member fromHex: s: string -> Color
static member fromKeyword: c: ColorKeyword -> Color
static member fromRGB: r: int -> g: int -> b: int -> Color
static member fromString: c: string -> Color
member Value: obj
<summary>
Plotly color can be a single color, a sequence of colors, or a sequence of numeric values referencing the color of the colorscale obj
</summary>
static member Color.fromKeyword: c: ColorKeyword -> Color
union case ColorKeyword.Cyan: ColorKeyword
union case ColorKeyword.Gray: ColorKeyword
namespace Plotly.NET.LayoutObjects
val rangeslider: RangeSlider
Multiple items
type RangeSlider =
inherit DynamicObj
new: unit -> RangeSlider
static member init: ?BgColor: Color * ?BorderColor: Color * ?BorderWidth: float * ?AutoRange: bool * ?Range: Range * ?Thickness: float * ?Visible: bool * ?YAxisRangeMode: RangesliderRangeMode * ?YAxisRange: Range -> RangeSlider
static member style: ?BgColor: Color * ?BorderColor: Color * ?BorderWidth: float * ?AutoRange: bool * ?Range: Range * ?Thickness: float * ?Visible: bool * ?YAxisRangeMode: RangesliderRangeMode * ?YAxisRange: Range -> (RangeSlider -> RangeSlider)
--------------------
new: unit -> RangeSlider
static member RangeSlider.init: ?BgColor: Color * ?BorderColor: Color * ?BorderWidth: float * ?AutoRange: bool * ?Range: StyleParam.Range * ?Thickness: float * ?Visible: bool * ?YAxisRangeMode: StyleParam.RangesliderRangeMode * ?YAxisRange: StyleParam.Range -> RangeSlider
val candles3: GenericChart.GenericChart
static member Chart.withXAxisRangeSlider: rangeSlider: RangeSlider * ?Id: StyleParam.SubPlotId -> (GenericChart.GenericChart -> GenericChart.GenericChart)