Page 1 of 1

I would like to ask about the output format of the datacursor function.

Posted: Mon Oct 16, 2023 1:17 am
by wooseok2725
hello. I have a question about the datacursor function.
Even though labelstimeformat is set to "HH:mm:ss", it is output as "am:time" on the datacursor. Is there any way to fix this?

thank you.

Re: I would like to ask about the output format of the datacursor function.

Posted: Mon Oct 16, 2023 7:17 am
by ArctionKestutis
Not sure what you mean. Maybe you could share image for clarity and more complete description of how relevant properties are set?
DataCursor should show same label style as set for Axis. Axis.LabelsTimeFormat property is taken into account only if you disabled Axis.AutoFormatLabels and set Axis..ValueType = AxisValueType.Time (or DateTime).
Note, that "HH:mm:ss" just set major tick style, but DataCursor is intended to explorer data in between. Therefore, its precision should be higher (1 or 2 decimal places).

Re: I would like to ask about the output format of the datacursor function.

Posted: Tue Oct 17, 2023 12:42 am
by wooseok2725
Image

The photo doesn't seem to be posting properly. To replace it in writing, it is as follows.

----Some x-axis settings----
<lc:ViewXY.XAxes>
<lc:AxisX
ValueType="Time"
ScrollMode="Scrolling"
LabelsColor="Black"
AxisColor="Black"
AutoFormatLabels="False"
LabelsTimeFormat="HH:mm:ss">

---datacursor tooltips contents---
CH001
X 오전 12:09:39
Y 2669.5


On the graph, when the x-axis is 00:09:39, it is a datacursor.
'오전' is 'AM'. (Korean)

Re: I would like to ask about the output format of the datacursor function.

Posted: Wed Oct 18, 2023 6:14 am
by ArctionKestutis
After more careful checking I realized that DataCursor is actually not using Axis.LabelsTimeFormat. Only axis labels are using this format-string. Internally DataCursor uses auto-formatting (depends on Axis range) and adds few digits to increase precision. Auto-format-string is based on Region Format (Windows settings).
If you don’t want AM/PM designator to appear in DataCursor label/table, then you should modify Windows regional settings accordingly. That is, ‘Short time’ and ‘Long time’ formats should be without am/pm designators.

Hope this helps.