Skip to content

Use VType display for formatting data browser cursor values#3695

Open
DenSinH wants to merge 2 commits into
ControlSystemStudio:masterfrom
High-Voltage-Engineering:dh-plot-markers
Open

Use VType display for formatting data browser cursor values#3695
DenSinH wants to merge 2 commits into
ControlSystemStudio:masterfrom
High-Voltage-Engineering:dh-plot-markers

Conversation

@DenSinH

@DenSinH DenSinH commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

Use VType display for formatting data browser cursor marker values. Previously, they were formatted using the formatting specified by the trace (which seemed to be obtained automatically, and depends on the axis labels, which can also not be configured manually it seems). I changed this to where this can be implemented in the PlotDataItem implementation. The default one is the same as the one that was implemented before, and I specified it for the PlotSample class, where it uses the FormatOptionHandler with the DEFAULT format to format the VType from the selected sample. This makes it so that the value formatted in the cursor marker and the value in the Traces table are all formatted using the VType's format, which is more consistent with the rest of the UI.

I am however not sure if I missed some configurable option, or if other sites possibly depend on the "old" formatting.

Checklist

  • Testing:

    • The feature has automated tests
    • Tests were run
    • Checked whether the newly formatted values properly showed up in the data browser
  • Documentation:

    • The feature is documented
    • The documentation is up to date
    • Release notes:
      • Added an entry if the change is breaking or significant
      • Added an entry when adding a new feature

@georgweiss

Copy link
Copy Markdown
Collaborator

@DenSinH, I have put this to the test, but honestly I cannot really see what it changes. Can you please clarify and provide an example (e.g. screen shots)?

@DenSinH

DenSinH commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

It's about this label:

image

which in the old situation would have its own formatting rules, which are formatted in the way defined in PlotDataItem, which takes the values from the YAxisImpl. Back when I worked on this I traced it back to how this was determined, and it boiled down to always being something like 3 decimals... This caused for inconsistencies in the UI.

In general this is kind of part of a bigger problem we are sometimes facing though: formatting of PVs is fairly inconsistent throughout Phoebus at times, even though the way PV values should be formatted is generally available in the VType.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants