Jump to content
Software FX Community

Timespan axis format


rudi

Recommended Posts

HI,

 I'm looking for some guidance as to how to format the Y axis nicely when it shows a timespan. I'm adding 5 points is a test, varying from 1 second to 3 seconds. On my Y-axis I see the value of 00:00:01 9 times and 00:00:02 10 times, while I would like to see it just once, as I would with standard numbers. Any thoughts?

<

Window x:Class="WpfApplicationTestGraph.Window1"

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

Title="Window1" Height="600" Width="800"

xmlns:my="clr-namespace:ChartFX.WPF;assembly=ChartFX.WPF"

xmlns:my1="clr-namespace:ChartFX.WPF.Motifs;assembly=ChartFX.WPF"

xmlns:cfxData="clr-namespace:ChartFX.WPF.Data;assembly=ChartFX.WPF.Data">

<Grid>

<my:Chart Name="chart1" Gallery="Line" Style="{x:Static my1:Basic.Style}">

<my:SeriesAttributes ItemsSource="{Binding Path=TheData}" BindingPath="RunDuration" Content="RunDuration"/>

<my:Chart.Titles>

<my:Title>Workflow Run Time</my:Title>

</my:Chart.Titles>

<my:Chart.AxesY>

<my:Axis>

<my:Axis.Labels>

<my:AxisLabelAttributes Format="TimeSpan" CustomFormat="hh:mm:ss"/>

</my:Axis.Labels>

</my:Axis>

</my:Chart.AxesY>

</my:Chart></Grid>

</

Window>

 

 

Link to comment
Share on other sites

We fixed a couple of issues in how we handle TimeSpan. The hotfix for RC1 should be available tomorrow (build 3408 or later) here

Note that with the update you do not need to set the CustomFormat to hh:mm:ss as it is the default (I am guessing you were setting it because of an issue where we generated empty labels).

JuanC

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.

Guest
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...