Jump to content
Software FX Community

Labels.Format not working?


daviddam

Recommended Posts

I am trying to format the X axis for a chart.  The data type coming from the DataTable is DateTime.  I tried setting what I thought were the right properties to format the data, but I always get the full datetime displayed on the axis (e.g. "6/24/2008 14:45:00").  Below is a snippet:

podChart.AxisX.Labels.Format =

AxisFormat.Date;podChart.AxisX.Labels.CustomFormat = "MMM-yy";

The documentation doesn't help since it actually refers to a LabelsFormat object which does not appear to exist any more.  Is the CustomFormat property the right one to use?  If so, is it working?  If not, what should I do?

 Also, I have tried setting these properties both before and after setting the ItemsSource for the chart (because of another forum post I saw), but it didn't seem to matter where the code was positioned.

Thank you,

David

Link to comment
Share on other sites

Not trying to be pushy, but I need to know if this is a problem with the control or something I am doing.  I've been stuck on this problem for some time now.  If someone could at least confirm whether this is a bug or not I would greatly appreciate it.  I have a workaround I could implement, but I don't want to implement a workaround for something that doesn't require one. :(

 Thank you,

David

Link to comment
Share on other sites

We retried both setting the AxisX properties in XAML ...

<

cfx:Chart x:Name="chart1" Gallery="Line" ItemsSource="{Binding Source={StaticResource bidsData}}">  <cfx:Chart.Series>   <cfx:SeriesAttributesCollection>   <cfx:SeriesAttributes BindingPath="Value" BindingPathX="Date" />   </cfx:SeriesAttributesCollection>  </cfx:Chart.Series>  <cfx:Chart.AxisX>   <cfx:Axis>   <cfx:Axis.Labels>   <cfx:AxisLabelAttributes Format="Date" CustomFormat="MMM-yy"/>   </cfx:Axis.Labels>   </cfx:Axis>   </cfx:Chart.AxisX></cfx:Chart>As well as setting the AxisX properties in code

  chart1.AxisX.Labels.Format =

AxisFormat.Date;   chart1.AxisX.Labels.CustomFormat = "MMM-yy";

Both tests worked as expected, can you check if you can duplicate this issues with our latest build? Can you create a small sample app with hardcoded data that reproduces the problem?

Regards,

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