ViewXY X Axis value labels - value dependent formatting
Posted: Thu Mar 29, 2018 8:56 pm
Hi,
I'm trying to create a scrolling ViewXY chart with the x-axis labels displaying in the format HH:mm:ss initially and d:HH:mm:ss after the chart has been scrolling for longer than 24 hours.
I've tried some workarounds but are having some problems with them still:
1. I can't create custom formatting strings with optional days (eg. [d]:HH:mm:ss) due to .Net limitations so I can only use the standard format strings. I would like to know if there's a converter of some kind that I can use to implement some value dependent ToString() methods.
2. When I tried to use the standard format strings, I've set the ValueType to Number but it seems the chart is still calling ToString for a DateTime object rather than a TimeSpan object. Due to this, I'm getting "1/1/0001 12:00:00 AM" as my initial label when using the generic format "g".
I'm trying to create a scrolling ViewXY chart with the x-axis labels displaying in the format HH:mm:ss initially and d:HH:mm:ss after the chart has been scrolling for longer than 24 hours.
I've tried some workarounds but are having some problems with them still:
1. I can't create custom formatting strings with optional days (eg. [d]:HH:mm:ss) due to .Net limitations so I can only use the standard format strings. I would like to know if there's a converter of some kind that I can use to implement some value dependent ToString() methods.
2. When I tried to use the standard format strings, I've set the ValueType to Number but it seems the chart is still calling ToString for a DateTime object rather than a TimeSpan object. Due to this, I'm getting "1/1/0001 12:00:00 AM" as my initial label when using the generic format "g".