Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

formatPattern is ignored on an axis used with a category plot #2245

Open
niloc132 opened this issue Oct 3, 2024 · 0 comments
Open

formatPattern is ignored on an axis used with a category plot #2245

niloc132 opened this issue Oct 3, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@niloc132
Copy link
Member

niloc132 commented Oct 3, 2024

Description

In a deephaven.plot.figure.Figure instance, the axis of a chart is defined separately from the series that will be related to it. The axis can be given a format pattern to use for values on that axis, and while that pattern is applied for xy series instances, it is not applied for category data.

Steps to reproduce

  1. Open a python console in the web UI
  2. Run the following script, to create a figure with an axis that has a pattern, and draw a category series on it
    from deephaven.plot.figure import Figure
    from deephaven import time_table
    
    t = time_table("PT1s").update(["A=i % 3", "B = `b` + (i % 5)"])
    p = Figure().x_axis(format_pattern="yyyy-MM").plot_cat(t=t, category="Timestamp", y="A", series_name="Series").show()
  3. Observe how the x axis labels are rendered
    Expected results
    X labels should show in the yyyy-MM format.

Actual results
X labels show in the default yyyy-MM-dd HH:mm:ss.SSSSSS format:
image

Additional details and attachments

Here's an analogous chart using an XY series:

from deephaven.plot.figure import Figure
from deephaven import time_table

t = time_table("PT1s").update(["A=i % 3", "B = `b` + (i % 5)"])
p = Figure().x_axis(format_pattern="yyyy-MM").plot_xy(t=t, x="Timestamp", y="A", series_name="Series").show()

image
Observe that the X labels follow the expected pattern.

Versions

  • Engine Version: 0.37.0-SNAPSHOT
  • Web UI Version: 0.95.0
  • Java Version: 11.0.24
  • Barrage Version: 0.6.0
  • OS: Linux
  • Browser: Firefox/Chrome
  • Docker: n/a
@niloc132 niloc132 added the bug Something isn't working label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant