Jump to content
Software FX Community

TimeSpan and CustomFormat


Recommended Posts


 I have a timespan attribute on the Y-axis, and I'm formatting it with the xaml code below. The CustomFormat seems ignored tho. Is that only working for DateTime attributes? The times I get on the Y-axis are in the form of "00:00:05.7272727", which is a littlebit too detailed.


<ChartFX:AxisLabelAttributes Format="TimeSpan" CustomFormat="h:m:s"/>

Link to comment
Share on other sites

The CustomFormat gets ignored when handling TimeSpans, primarily because the .NET framework does not support formatting timespans as it does with numbers, or DateTime.

We will add custom code to format timespans in our beta 3 bits. It will support d,h,m,s,f (days, hours, minutes, seconds, and milliseconds) as well as repeating each character more than once to support leading zeroes.



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...