Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/Feliz.Recharts/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## 5.1.1 - 2026-07-09

### 🐛 Fixed

- `Feliz.Recharts.line.strokeOpacity` incorrectly emit `stroke-opacity` instead of `strokeOpacity`. #718 (by @Freymaurer, @projecteon)

## 5.1.0 - 2026-03-20

### 🔄 Changed
Expand Down
67 changes: 43 additions & 24 deletions src/Feliz.Recharts/Line.fs
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,41 @@ open Fable.Core

[<Erase>]
type line =
static member inline strokeWidth(value : int) = Interop.mkLineAttr "strokeWidth" value
static member inline strokeWidth(value: int) = Interop.mkLineAttr "strokeWidth" value

/// The source data, in which each element is an object.
static member inline data (values: seq<'a>) = Interop.mkLineAttr "data" (Seq.toArray values)
static member inline data(values: seq<'a>) =
Interop.mkLineAttr "data" (Seq.toArray values)

/// The source data, in which each element is an object.
static member inline data (values: 'a list) = Interop.mkLineAttr "data" (List.toArray values)
static member inline data(values: 'a list) =
Interop.mkLineAttr "data" (List.toArray values)

/// The source data, in which each element is an object.
static member inline data (values: 'a array) = Interop.mkLineAttr "data" values
static member inline data(values: 'a array) = Interop.mkLineAttr "data" values

static member inline name(value: string) = Interop.mkLineAttr "name" value
static member inline dataKey (value: string) = Interop.mkLineAttr "dataKey" value
static member inline dataKey (f: 'a -> string) = Interop.mkLineAttr "dataKey" f
static member inline dataKey (f: 'a -> int) = Interop.mkLineAttr "dataKey" f
static member inline dataKey (f: 'a -> float) = Interop.mkLineAttr "dataKey" f
static member inline dataKey (f: 'a -> string option) = Interop.mkLineAttr "dataKey" f
static member inline dataKey (f: 'a -> int option) = Interop.mkLineAttr "dataKey" f
static member inline dataKey (f: 'a -> float option) = Interop.mkLineAttr "dataKey" f
static member inline stroke (value: string) = Interop.mkLineAttr "stroke" value
static member inline strokeOpacity (value: float) = Interop.mkLineAttr "stroke-opacity" value
static member inline fill (value: string) = Interop.mkLineAttr "fill" value
static member inline xAxisId (value: string) = Interop.mkLineAttr "xAxisId" value
static member inline yAxisId (value: string) = Interop.mkLineAttr "yAxisId" value
static member inline xAxisId (value: int) = Interop.mkLineAttr "xAxisId" value
static member inline yAxisId (value: int) = Interop.mkLineAttr "yAxisId" value
static member inline strokeDasharray([<ParamArray>] values: int []) = Interop.mkLineAttr "strokeDasharray" (values |> Array.map string |> String.concat " ")
static member inline dataKey(value: string) = Interop.mkLineAttr "dataKey" value
static member inline dataKey(f: 'a -> string) = Interop.mkLineAttr "dataKey" f
static member inline dataKey(f: 'a -> int) = Interop.mkLineAttr "dataKey" f
static member inline dataKey(f: 'a -> float) = Interop.mkLineAttr "dataKey" f
static member inline dataKey(f: 'a -> string option) = Interop.mkLineAttr "dataKey" f
static member inline dataKey(f: 'a -> int option) = Interop.mkLineAttr "dataKey" f
static member inline dataKey(f: 'a -> float option) = Interop.mkLineAttr "dataKey" f
static member inline stroke(value: string) = Interop.mkLineAttr "stroke" value

static member inline strokeOpacity(value: float) =
Interop.mkLineAttr "strokeOpacity" value

static member inline fill(value: string) = Interop.mkLineAttr "fill" value
static member inline xAxisId(value: string) = Interop.mkLineAttr "xAxisId" value
static member inline yAxisId(value: string) = Interop.mkLineAttr "yAxisId" value
static member inline xAxisId(value: int) = Interop.mkLineAttr "xAxisId" value
static member inline yAxisId(value: int) = Interop.mkLineAttr "yAxisId" value

static member inline strokeDasharray([<ParamArray>] values: int[]) =
Interop.mkLineAttr "strokeDasharray" (values |> Array.map string |> String.concat " ")

static member inline monotone = Interop.mkLineAttr "type" "monotone"
static member inline basis = Interop.mkLineAttr "type" "basis"
static member inline basisClosed = Interop.mkLineAttr "type" "basisClosed"
Expand All @@ -42,7 +53,7 @@ type line =
static member inline stepBefore = Interop.mkLineAttr "type" "stepBefore"
static member inline stepAfter = Interop.mkLineAttr "type" "stepAfter"
static member inline monotoneY = Interop.mkLineAttr "type" "monotoneY"
static member inline connectNulls (value : bool) = Interop.mkLineAttr "connectNulls" value
static member inline connectNulls(value: bool) = Interop.mkLineAttr "connectNulls" value
static member inline dot(value: bool) = Interop.mkLineAttr "dot" value
static member inline dot(render: IDotProperties<'a> -> ReactElement) = Interop.mkLineAttr "dot" render
static member inline activeDot(value: bool) = Interop.mkLineAttr "activeDot" value
Expand All @@ -52,14 +63,22 @@ type line =
static member inline label(value: float) = Interop.mkLineAttr "label" value
static member inline label(value: ReactElement) = Interop.mkLineAttr "label" value
static member inline label(value: ILabelProperties -> ReactElement) = Interop.mkLineAttr "label" value

/// If set false, animation of area will be disabled.
static member inline isAnimationActive (value: bool) = Interop.mkLineAttr "isAnimationActive" value
static member inline isAnimationActive(value: bool) =
Interop.mkLineAttr "isAnimationActive" value

/// Specifies when the animation should begin, the unit of this option is ms.
static member inline animationBegin (value: int) = Interop.mkLineAttr "animationBegin" value
static member inline animationBegin(value: int) =
Interop.mkLineAttr "animationBegin" value

/// Specifies the duration of animation, the unit of this option is ms. Default is `1500ms`.
static member inline animationDuration (value: int) = Interop.mkLineAttr "animationDuration" value
static member inline animationDuration(value: int) =
Interop.mkLineAttr "animationDuration" value

/// Specifies the duration of animation. Default is `1500ms`.
static member inline animationDuration (value: TimeSpan) = Interop.mkLineAttr "animationDuration" value.TotalMilliseconds
static member inline animationDuration(value: TimeSpan) =
Interop.mkLineAttr "animationDuration" value.TotalMilliseconds

[<Erase>]
module line =
Expand Down