Skip to content

Commit a6bcefb

Browse files
author
bvenn
committed
add mode argument to range charts
closes #27
1 parent d6e97d2 commit a6bcefb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/FSharp.Plotly/Chart.fs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ type Chart =
137137

138138

139139
/// Displays a range of data by plotting two Y values per data point, with each Y value being drawn as a line
140-
static member Range(x, y, upper, lower,?Name,?ShowMarkers,?Showlegend,?Color,?RangeColor,?Labels,?TextPosition,?TextFont) =
140+
static member Range(x, y, upper, lower,mode,?Name,?ShowMarkers,?Showlegend,?Color,?RangeColor,?Labels,?TextPosition,?TextFont) =
141141
// if text position or font is set than show labels (not only when hovering)
142142
let changeMode =
143143
let isShowMarker =
@@ -150,7 +150,7 @@ type Chart =
150150

151151
let trace =
152152
Trace.initScatter (
153-
TraceStyle.Scatter(X = x,Y = y, Mode=changeMode StyleParam.Markers, ?Fillcolor=Color) )
153+
TraceStyle.Scatter(X = x,Y = y, Mode=mode, ?Fillcolor=Color) )
154154
|> TraceStyle.TraceInfo(?Name=Name,?Showlegend=Showlegend)
155155
|> TraceStyle.Line(?Color=Color)
156156
|> TraceStyle.Marker(?Color=Color)
@@ -161,22 +161,22 @@ type Chart =
161161
TraceStyle.Scatter(X = x,Y = lower, Mode=StyleParam.Lines, ?Fillcolor=RangeColor) )
162162
|> TraceStyle.TraceInfo(Showlegend=false)
163163
|> TraceStyle.Line(Width=0)
164-
|> TraceStyle.Marker(Color=if RangeColor.IsSome then RangeColor.Value else "rgba(0,0,,0.5)")
164+
|> TraceStyle.Marker(Color=if RangeColor.IsSome then RangeColor.Value else "rgba(0,0,0,0.5)")
165165

166166
let upper =
167167
Trace.initScatter (
168168
TraceStyle.Scatter(X = x,Y = upper, Mode=StyleParam.Lines, ?Fillcolor=RangeColor, Fill=StyleParam.ToNext_y) )
169169
|> TraceStyle.TraceInfo(Showlegend=false)
170170
|> TraceStyle.Line(Width=0)
171-
|> TraceStyle.Marker(Color=if RangeColor.IsSome then RangeColor.Value else "rgba(0,0,,0.5)")
171+
|> TraceStyle.Marker(Color=if RangeColor.IsSome then RangeColor.Value else "rgba(0,0,0,0.5)")
172172

173173
GenericChart.MultiChart ([lower;upper;trace],Layout(),Config())
174174

175175

176176
/// Displays a range of data by plotting two Y values per data point, with each Y value being drawn as a line
177-
static member Range(xy, upper, lower,?Name,?ShowMarkers,?Showlegend,?Color,?RangeColor,?Labels,?TextPosition,?TextFont) =
177+
static member Range(xy, upper, lower, mode, ?Name,?ShowMarkers,?Showlegend,?Color,?RangeColor,?Labels,?TextPosition,?TextFont) =
178178
let x,y = Seq.unzip xy
179-
Chart.Range(x, y, upper, lower, ?Name=Name,?ShowMarkers=ShowMarkers,?Showlegend=Showlegend,?Color=Color,?RangeColor=RangeColor,?Labels=Labels,?TextPosition=TextPosition,?TextFont=TextFont)
179+
Chart.Range(x, y, upper, lower, mode, ?Name=Name,?ShowMarkers=ShowMarkers,?Showlegend=Showlegend,?Color=Color,?RangeColor=RangeColor,?Labels=Labels,?TextPosition=TextPosition,?TextFont=TextFont)
180180

181181

182182
/// Emphasizes the degree of change over time and shows the relationship of the parts to a whole.

0 commit comments

Comments
 (0)