Skip to content

Visible property in Dimension is not working as expected for Splom Plot #223

@MaheshPunna

Description

@MaheshPunna
open FSharp.Data
open Plotly.NET.TraceObjects

let data =
    CsvFile.Load("https://raw.githubusercontent.com/plotly/datasets/master/iris-data.csv")

let getHeader i =
    match data.Headers with
    | Some header -> header.[i]
    | _ -> String.Empty

let splomData =
    [ for i in 0 .. data.NumberOfColumns - 2 -> getHeader i, [ for row in data.Rows -> row.GetColumn(i) ] ]

let dimensions =
    splomData
    |> Seq.mapi
        (fun i dim ->
            Dimensions.init (
                Values = snd dim,
                Label = fst dim,
                Visible = if i % 2 = 0 then true else false
            ))

Chart.Splom(dims = dimensions)
|> Chart.withLayout (Layout.init (PlotBGColor = Color.fromString "#e5ecf6"))
|> Chart.withMarkerStyle (Outline = Line.init (Color = Color.fromString "white", Width = 0.5))

Current Behavior:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions