Skip to content

Customizing Tick Label Formatting by Zoom Level does not seem to be working #228

Description

@MaheshPunna
open Plotly.NET
open Plotly.NET.LayoutObjects

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

let y = data.Rows |> Seq.map (fun row -> row.GetColumn("AAPL.Close"))
let x = data.Rows |> Seq.map (fun row -> row.GetColumn("Date"))

let tickFormatStops = [
    TickFormatStop.init(DTickRange=[("nothing","1000")],Value="%H:%M:%S.%L ms")
    TickFormatStop.init(DTickRange=[("1000","60000")],Value="%H:%M:%S s")
    TickFormatStop.init(DTickRange=[("60000", "3600000")],Value="%H:%M m")
    TickFormatStop.init(DTickRange=[("3600000", "86400000")],Value="%H:%M h")
    TickFormatStop.init(DTickRange=[("86400000", "604800000")],Value="%e. %b d")
    TickFormatStop.init(DTickRange=[("604800000", "M1")],Value="%e. %b w")
    TickFormatStop.init(DTickRange=[("M1", "M12")],Value="%b %y M")
    TickFormatStop.init(DTickRange=[("M12", "nothing")],Value="%Y Y")
    ]

Chart.Line(x=x,y=y)
|> Chart.withXAxisRangeSlider(RangeSlider.init(Visible=true))
|> Chart.withXAxis(LinearAxis.init(TickFormatStops=tickFormatStops))

image

TickFormatStop Label Format is not considered

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions