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
Open a python console in the web UI
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()
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:
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()
Observe that the X labels follow the expected pattern.
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
Run the following script, to create a figure with an axis that has a pattern, and draw a category series on it
Actual results X labels show in the default yyyy-MM-dd HH:mm:ss.SSSSSS format:
Additional details and attachments
Here's an analogous chart using an XY series:
Observe that the X labels follow the expected pattern.
Versions