Welcome to the Xceed Community Sign in | Join | Help
Community Search  

Barseries and Axis Labeling

Sort Posts: Previous Next
  •  06-30-2008, 12:20 PM Post no. 13311

    Barseries and Axis Labeling

    Hi!

    I am working with Xceed Chart in .net for a prototype.

    Therefore i have to make a graph with barseries.

    Everything is allright. The only Problem ist, that the PrimaryX shows  only the count of datapoints ( 0    1   2   3   4   5), but it should display the years ( 2008   2009   2010   2011)

     i add data like this :  bar[0].Add(sum, cyear.ToString());

     In an Chart with lineseries i got this with a line.usexvalues ....   but there is no function like this for barseries? !

     

    So, my question is how to get the labels from my barseries shown.

     

    Thanks !
     

  •  07-01-2008, 5:59 PM Post no. 13351 in reply to 13311

    Re: Barseries and Axis Labeling

    You need to turn off auto labeling on the axis, and provide your own labels, because a BarSeries does not have X values.

    e.g.:

    chart.Axis( StandardAxis.PrimaryX ).DimensionScale.AutoLabels = false;

    chart.Axis( StandardAxis.PrimaryX ).Labels.Add( "2008" );

    chart.Axis( StandardAxis.PrimaryX ).Labels.Add( "2009" );

    chart.Axis( StandardAxis.PrimaryX ).Labels.Add( "2010" );

    chart.Axis( StandardAxis.PrimaryX ).Labels.Add( "2011" );


    André
    Software Developer and Tech Support
    Xceed Software Inc.
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2008 Xceed Software Inc.