Skip to content

Commit 1e06cdd

Browse files
committed
#253: Fix threshold parameter name
1 parent ea809d1 commit 1e06cdd

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/Plotly.NET/Playground.fsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,12 @@ Chart.Indicator(
183183
Range = StyleParam.Range.MinMax(0., 250.),
184184
Domain = Domain.init(Row = 0, Column = 1),
185185
Gauge = IndicatorGauge.init(
186+
Bar = IndicatorBar.init(Color = Color.fromKeyword Black),
186187
Steps = [
187-
IndicatorStep.init(Range = StyleParam.Range.MinMax(0., 150.), Color = Color.fromKeyword Cyan)
188-
IndicatorStep.init(Range = StyleParam.Range.MinMax(150., 250.), Color = Color.fromKeyword Red)
189-
]
188+
IndicatorStep.init(Range = StyleParam.Range.MinMax(0., 150.), Color = Color.fromKeyword Green)
189+
IndicatorStep.init(Range = StyleParam.Range.MinMax(150., 200.), Color = Color.fromKeyword Yellow)
190+
],
191+
Threshold = IndicatorThreshold.init(Value = 200., Line = Line.init(Color=Color.fromKeyword Red, Width = 20.))
190192
)
191193
)
192194
|> Chart.show

src/Plotly.NET/Traces/ObjectAbstractions/Indicator.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,6 @@ type IndicatorGauge() =
245245
BorderWidth |> DynObj.setValueOpt indicatorGauge "borderwidth"
246246
Shape |> DynObj.setValueOptBy indicatorGauge "shape" StyleParam.IndicatorGaugeShape.convert
247247
Steps |> DynObj.setValueOpt indicatorGauge "steps"
248-
Threshold |> DynObj.setValueOpt indicatorGauge "threshold "
248+
Threshold |> DynObj.setValueOpt indicatorGauge "threshold"
249249

250250
indicatorGauge)

0 commit comments

Comments
 (0)