Jump to content
Software FX Community

X Axis labels bug


Recommended Posts


 When I set my own X-axis labels for a bar chart, the X-axis labels don't appear until I resize the chart.  This is using 8.0.3702.26297.  Please let me know if there is any workaround.  Sample code below:

 <Window x:Class="WpfApplication8.Window1"   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"   xmlns:cfx="http://schemas.softwarefx.com/chartfx/wpf/80"   Title="Window1" Height="300" Width="300">   <Grid>   <Grid.RowDefinitions>   <RowDefinition/>   <RowDefinition Height="Auto"/>   </Grid.RowDefinitions>   <cfx:Chart x:Name="chart"/>   <Button Grid.Row="1" Content="Load" Click="Button_Click"/>   </Grid></Window>


  public partial class Window1 : Window   {   public Window1()   {   InitializeComponent();   this.chart.Series.Clear();   this.chart.ItemsSource = null;   this.chart.Gallery = Gallery.Bar;   }   private void Button_Click(object sender, RoutedEventArgs e)   {   this.chart.Series.Clear();   this.chart.Series.Add(new SeriesAttributes());   this.chart.Data.Y[0, 0] = 1;   this.chart.Data.Y[0, 1] = 2;   this.chart.Data.Y[0, 2] = 3;   chart.AxisX.Labels.Items[0] = "one";   chart.AxisX.Labels.Items[1] = "two";   chart.AxisX.Labels.Items[2] = "three";   }   }


Thanks very much.

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